Skip to main content

How to add an I agree to the terms and conditions checkbox

Official response from

If you'd like to ensure that users are agreeing to a set of terms and conditions before they submit a form on your NationBuilder website, you can do so using this custom theme customization:

1. Create a new file in your website's custom theme. Call it "_terms_and_conditions.html".

2. Paste the code from this gist into that file and save it: https://gist.github.com/bpalm/13040407f30c81f4b4da3b0cd386359d

3. On any page that you'd like the checkbox(es) to show up, click into the custom page template for that page and paste the following code in the place in your HTML template where you'd like the boxes to show up:

{% include "terms_and_conditions" %}

It is worth noting that the code there contains two checkboxes and the javascript disables the submit button until both are checked. If you'd like only one checkbox, you'll need to delete lines 7-11 in that file, remove ", #cart" from line 16 and delete line 18. 

You also may want to hyperlink the term "terms and conditions" to a specific URL that contains your terms and conditions. This can be done in the HTML using an <a> tag: https://www.w3schools.com/tags/tag_a.asp

TIP: Add target="_blank" to the <a> tag if you'd like it to open up in a new window.

Share this post

Showing 1 reaction

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.