Home / Admin / WP Simple Pay: Require Terms of Service Link Click
Duplicate Snippet

Embed Snippet on Your Site

WP Simple Pay: Require Terms of Service Link Click

Disables a checkbox until a link within the checkbox label is clicked.

Code Preview
js
jQuery( function() {
	var fieldId = 'simpay-form-771-field-5';
	var $checkbox = jQuery('#' + fieldId);
	$checkbox.prop( 'disabled', true );
	jQuery('label[for="' + fieldId + '"] a').on( 'click', function() {
		$checkbox.prop( 'disabled', false );
	} );
});

Comments

Add a Comment