Add required attributes to input fields