Sander Posted August 26, 2016 Report Share Posted August 26, 2016 I have a submission form where I have sections that are hidden based on the input of the user (if the user input is not as desired, an error message is displayed by unhiding a section). Users should not be able to submit the form when any section is showing, for this i intent to use event.preventDefault(). How can I do this in javascript? Any suggestion are welcome. Quote Link to comment Share on other sites More sharing options...
Mathilda Posted September 14, 2016 Report Share Posted September 14, 2016 On 8/26/2016 at 2:40 PM, Sander said: I have a submission form where I have sections that are hidden based on the input of the user (if the user input is not as desired, an error message is displayed by unhiding a section). Users should not be able to submit the form when any section is showing, for this i intent to use event.preventDefault(). How can I do this in javascript? Any suggestion are welcome. Hi Sander, I suppose you may check input using "if else" statement. Please take a look at this solution, probably it might help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.