I have a form with required fields. Users often don't remember they need all of the required information, and they currently have to leave and start over again once they get it.
I want to offer two different submit buttons, one as a Continue, one as a Save for Later. The onclick for the Continue button runs a validator that would reject the submission if required info was missing. The Save for later would not run this same validator, thus allowing required fields to be empty.
On the page that processes the information, I need something to trigger one of two different redirects once the data is saved - A) a page that allows inputting of the next step, B) a page that tells them how to get back to the information once they're ready to continue.
I envision using a hidden input with a value of either 1 (automatic - Continue) or 2(Javascript-edited - Save). The processing page would then use that field to determine where to send the user next.
Can I use Javascript to change the hidden value when the onclick event is triggered?
Cheryl dc Kern
I want to offer two different submit buttons, one as a Continue, one as a Save for Later. The onclick for the Continue button runs a validator that would reject the submission if required info was missing. The Save for later would not run this same validator, thus allowing required fields to be empty.
On the page that processes the information, I need something to trigger one of two different redirects once the data is saved - A) a page that allows inputting of the next step, B) a page that tells them how to get back to the information once they're ready to continue.
I envision using a hidden input with a value of either 1 (automatic - Continue) or 2(Javascript-edited - Save). The processing page would then use that field to determine where to send the user next.
Can I use Javascript to change the hidden value when the onclick event is triggered?
Cheryl dc Kern