Acceptance Checkbox

You may wish to allow users to submit your contact form only if they accept certain terms. In such cases, a form tag acceptance will be useful.

The process is simple. Just insert an acceptance tag into your form like this:

[acceptance accept-this] Check here if you accept these terms.

Due to JavaScript magic, users won’t be able to press the submit button without first checking the box to accept your terms. In addition, you can invert it with an invert option, i.e. allowing users to submit only if they uncheck the checkbox.

Available options for acceptance
Option Examples Description
id:(id) id:foo id attribute value of the input element.
class:(class) class:bar class attribute value of the input element. To set two or more classes, you can use multiple class: option, like [acceptance accept-this class:y2008 class:m01 class:d01].
tabindex:(num) tabindex:10 tabindex attribute value of the input element.
invert Allow users to submit only if they uncheck the checkbox.
default:on Check the checkbox by default.

Demo

Note: This is a demo. This form doesn’t send a mail practically.

1) Default
Check here if you accept these terms.

2) Inverted
Uncheck here if you accept these terms.

3) Checked by default + Inverted
Uncheck here if you accept these terms.

View source of above form:

1) Default
[acceptance accept-this-1] Check here if you accept these terms.

2) Inverted
[acceptance accept-this-2 invert] Uncheck here if you accept these terms.

3) Checked by default + Inverted
[acceptance accept-this-3 invert default:on] Uncheck here if you accept these terms.

[submit "Send"]

Acceptance as Validation

By default, an acceptance checkbox is a different mechanism than general input validation, and it runs after all validation succeeds. You might want to change this behavior to make it work like other validation because you think it’s less confusing for submitters than the default behavior. In such cases, add this line to the Additional Settings section:

acceptance_as_validation: on

This setting makes all acceptance checkboxes in the form work like validation, and shows the usual validation error message next to the checkbox if the submitter doesn’t check the box.

Just another contact form plugin for WordPress. Simple but flexible.