Hi. Not sure where to put this but basically I have a form. There are two buttons. One says submit and the other says print form.
How do I make sure that the user has clicked the print form button before the form gets submitted.
For example, a user fills out my form and then hits submit. If they didn't click submit first, a javascript error will pop up and say "print form". If they did print the form befor hitting submit, it will allow the form to pass on to the proper page.
Heres what I was thinking of using but not sure how to code it correctly.
$('#Submit, #Print').click(function () {
if (this.id == 'Submit') {
alert('Print the Form First!');
}
else if (this.id == 'Print') {
//Continue Form action.
}
});