Removing a Required Form Field?
Is it possible to make a required filed optional or remove a required form field entirely with the optimizely editor? I can hide or remove the fields but I'm unable to get it to actually work in practice since the page still requires content in that field when submitting.
I'm trying to test the telephone field in our checkout page. My assumption is that it will help conversion by making it optional or removing it entirely but I'd love to see the numbers. My experiment ID is 1478314146.
Any feedback is appreciated.
Solved! Go to Solution.
It appears that your form validation is expecting a 10 digit value for this field before you can continue. Try adding an arbitrary value, then hide the field. Pasting the following line into your variation code should do the trick.
Yup. As the previous reply has stated you just need to populate it with something you know to be wrong.
If you make sure you make the value something that is easy to find in the database you can run a clean up once you have finished your testing.
ok thx that worked for me. Anoterh question regarding this problem: How is it possible to SET a manditory field via optimizely (which was not a manditory field before).
You could simply add a piece of Jquery that checks for a form submit and intercept your current form validation with validation for the single field first.
I am not sure why you would want to 'add' validation to an existing form in a test but I am sure there is possibly someone here who can provide an efficient solution as it is not something I have tackled before.