Add autofill function in view