I've created a custom form in SPD 2013. On my form, I've got a series of required fields. I coded the OnClick feature of the "Submit" button of my form so that when a user submits the form, a success message along the lines of "Your new request has been submitted successfully." will pop up on the screen.
The problem is that by coding the OnClick function of the button, this message is popping up before the field validation of the required fields in my list is being done. So if a user doesn't fill out a required field, they are getting the error message and highlighted field AFTER they have gotten my success message from the OnClick.
Can someone please assist me in resolving this so that error validation is done before the success message pops up?