Happy Wednesday!
In this project I created a way to toggled an input field as required or not required depending on its visibility.
This is super handy if you only want a field to be required if the user needs it. I.e. Maybe you have a form with some conditional fields. Let's say you only want to collect someone's phone number IF they give you permission to contact them. You want the phone number to be required, but only if they give you permission to contact them.
This allows the form to submit when the required phone number field is hidden, but prevents the submission if it's visible. Super handy!
if you have any questions please leave a comment on the loom video here. https://www.memberstack.com/scripts/32-set-input-to-required-if-visible
0 Comments