FF1+ IE5+ Opr7+

"Accept terms" form submission

Author: Dynamic Drive

Description: Does your form contain an "Accept terms" section users must agree to before submitting the form? If so, this script helps enforce it, by disabling the submit button (in IE4+ and NS6+) or process (all other browsers) until he/she checks a box indicating compliance.

Demo: Try submitting the below sample form:


I agree to the above terms


Directions: Developer's View

Step 1: Add the below script to the <HEAD> section of your page:

Select All

Step 2: Insert the below sample form onto your page, which also demonstrates how to associate the script with your own form:

Select All

As shown, to integrate the script to your form, 1) Give both your FORM and the checkbox a name 2) Inside both these two tags, insert the "extra" code 3) Finally in the script that follows the form, change the two names referenced to your form's name.

Wordpress Users: Step by Step instructions to add ANY Dynamic Drive script to an entire Wordpress theme or individual Post