Created
November 12, 2013 17:56
-
-
Save longjasonm/7435533 to your computer and use it in GitHub Desktop.
Validate a Marketo Terms and Conditions (or any other) Checkbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add the ID of your Marketo Form | |
$('#mktForm_1030').attr('onSubmit','return validate_form ( );'); | |
//Add the "name" properties of your form and field. i.e. mktForm_1030, CustomField_Terms_of_Service) | |
function validate_form ( ) | |
{ | |
valid = true; | |
if ( document.mktForm_1030.CustomField_Terms_of_Service.checked == false ) | |
{ | |
alert ( "Please check the Terms & Conditions box." ); | |
valid = false; | |
} | |
return valid; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment