How do you cancel (return from) a form where you have set a SPRY text field as 'required'

I have set a few fields on a form as being required (via SPRY) but I also have a 'Cancel' button on the page - of course if I hit the button,  control doesn't pass back to the php as the javascript intervenes first and issues error messages to each empty on screen field - how do you get around this?
me_patrickAsked:
Who is Participating?
 
Jason C. LevineConnect With a Mentor No oneCommented:
Hi me_patrick,

Does the "Cancel" button cause a form submission?  If so, then Spry (or most any validation) will fire because it works onSubmit by default.

You would need to use a reset button to return the form to its default state or not use a button at all (use a link instead).
0
 
me_patrickAuthor Commented:
Of Course! Yes - use a link - thanks Jason.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.