I'm trying to setup a contact form for a Landing Page where leads have to click on "Yes" to having read the terms of service. It would be much easier to simply have an "I accept" checkbox as opposed to "Yes" and "No" Radio Buttons but unfortunately thats what has been asked of me. I'm using Unbounce as a platform. Could someone please help me write out the code? Thanks :)
lp.jQuery(function($) {
// Config
var ruleID = 'I have read the TOS';
var field = 'terms_of_service';
var message = 'Please confirm you have read the Terms of Service by clicking YES';
var rules = module.lp.form.data.validationRules[field];
...
This is code to check if radio button or checkbox is checked. Remember you must add
checkedHTML attribute to "No" so it is checked by default.