Skip to main content
All CollectionsWebsiteHow pages work
Remove email and text opt-in checkboxes from a page
Remove email and text opt-in checkboxes from a page

Many of NationBuilder's page types provide default settings for email and text opt in checkboxes.

Updated over 4 years ago

📌 Note: Text Messages are available as add-ons. For more information on adding new features please see the add-ons page in your nation.

Watch a video

Removing the code for email and text opt in checkboxes

Find your website's theme templates. To do so, in the control panel, go to Website and select the site you wish to modify.

1. Click on Theme > Templates and select the File name of the page type you wish to modify. 

There are two template files for each page, the top one, e.g. pages_show_endorsement.html, is for pages utilizing a sidebar, the bottom, e.g. pages_show_endorsement_wide.html, is for a page without a sidebar. 

2. You will land on a page similar to this where you will remove the lines of code outlined below according to your page type. When you are finished, click Save and publish changes

Page types:

Donation V1 &V2 pages:

      <div class="row-fluid">
        <div class="span12">
          <label class="checkbox" for="donation_email_opt_in">{% check_box "email_opt_in" %} Send email updates</label>
        </div>
      </div>
    

Donation V1 & V2 pages with ACTION theme:

  <div class="row">
    <div class="col-sm-12">
      <div class="checkbox">
        {% check_box "email_opt_in", class:"checkbox" %}<label for="donation_email_opt_in">Send email updates</label>
      </div>
    </div>
  </div>

Endorsement page:

  <div class="row-fluid">
    <div class="span6">
      <label for="endorsement_email_opt_in" class="checkbox">{% check_box "email_opt_in", class:"checkbox" %} Send me email updates</label>
    </div>
    {% if site.ask_for_mobiles? %}
      <div class="span6">
        <label for="endorsement_mobile_opt_in" class="checkbox">{% check_box "mobile_opt_in", class:"checkbox" %} Send me text message updates</label>
      </div>
    {% endif %}
  </div>

Endorsement page with ACTION theme:

  {% if request.sorta_logged_in? == false %}
    <div class="row">
      <div class="col-md-12"><div class="checkbox">{% check_box "email_opt_in", class:"checkbox" %} <label for="endorsement_email_opt_in">Send me email updates</label></div></div>
      {% if site.ask_for_mobiles? %}
        <div class="col-md-12"><div class="checkbox">{% check_box "mobile_opt_in", class:"checkbox" %} <label for="endorsement_mobile_opt_in">Send me text message updates</label></div></div>
      {% endif %}
    </div>
  {% endif %}

Event page:

  <div class="row-fluid">
    <div class="span6">
      <label for="event_rsvp_email_opt_in" class="checkbox">{% check_box "email_opt_in", class:"checkbox" %} Send me email updates</label>
    </div>
    {% if site.ask_for_mobiles? %}
      <div class="span6">
        <label for="event_rsvp_mobile_opt_in" class="checkbox">{% check_box "mobile_opt_in", class:"checkbox" %} Send me text messages</label>
      </div>
    {% endif %}
  {% endif %}
  </div>

Event page ACTION theme:

  {% if request.sorta_logged_in? == false %}
    <div class="row">
      <div class="col-md-12"><div class="checkbox">{% check_box "email_opt_in", class:"checkbox" %}<label for="event_rsvp_email_opt_in">Send me email updates</label></div>
      {% if site.ask_for_mobiles? %}
        <div class="checkbox">{% check_box "mobile_opt_in", class:"checkbox" %}<label for="event_rsvp_mobile_opt_in">Send me text messages</label></div>
      {% endif %}
    </div>
  {% endif %}

Feedback page:

  <div class="row-fluid">
    <div class="span6">
      <label class="checkbox" for="feedback_email_opt_in">{% check_box "email_opt_in", class:"checkbox" %} Send me email updates</label>
    </div>
  {% if site.ask_for_mobiles? %}
    <div class="span6">
      <label class="checkbox" for="feedback_mobile_opt_in">{% check_box "mobile_opt_in", class:"checkbox" %} Send me text messages</label>
    </div>
  {% endif %}
  </div>

Feedback page ACTION theme:

  {% if request.sorta_logged_in? == false or request.current_signup.has_mobile? == false %}
 
    <div class="col-md-12"><div class="checkbox">{% check_box "email_opt_in", class:"checkbox" %} <label for="feedback_email_opt_in">Send me email updates</label></div>
    </div>
 
    {% if site.ask_for_mobiles? %}
    <div class="col-md-12"><div class="checkbox">{% check_box "mobile_opt_in", class:"checkbox" %} <label for="feedback_mobile_opt_in">Send me text messages</label></div></div>
    {% endif %}
 
  {% endif %}

Moneybomb page:

  <div class="row-fluid">
    <div class="span6">
      <label class="checkbox" for="pledge_email_opt_in">{% check_box "email_opt_in", class:"checkbox" %} Send me email updates</label>
    </div>
    {% if site.ask_for_mobiles? %}
    <div class="span6">
      <label class="checkbox" for="pledge_mobile_opt_in">{% check_box "mobile_opt_in", class:"checkbox" %} Send me text message updates</label>
    </div>
    {% endif %}
 

Moneybomb page ACTION theme:

<div class="row-fluid">
    <div class="span6">
      <label class="checkbox" for="pledge_email_opt_in">{% check_box "email_opt_in", class:"checkbox" %} Send me email updates</label>
    </div>
    {% if site.ask_for_mobiles? %}
    <div class="span6">
      <label class="checkbox" for="pledge_mobile_opt_in">{% check_box "mobile_opt_in", class:"checkbox" %} Send me text message updates</label>
    </div>
    {% endif %}
  </div>

Petition page:

  <div class="row-fluid">
    <div class="span6">
      <label class="checkbox" for="petition_signature_email_opt_in">{% check_box "email_opt_in", class:"checkbox" %} Send me email updates</label>
    </div>
    {% if site.ask_for_mobiles? %}
    <div class="span6">
      <label class="checkbox" for="petition_signature_mobile_opt_in">{% check_box "mobile_opt_in", class:"checkbox" %} Send me text message updates</label>
    </div>
    {% endif %}
  </div>

Petition page ACTION theme:

{% if request.sorta_logged_in? == false %}
    <div class="row">
      <div class="col-md-12"><div class="checkbox">{% check_box "email_opt_in", class:"checkbox" %}<label for="petition_signature_email_opt_in">Send me email updates</label></div>
      </div>
      {% if site.ask_for_mobiles? %}
        <div class="col-md-12"><div class="checkbox">{% check_box "mobile_opt_in", class:"checkbox" %}<label for="petition_signature_mobile_opt_in">Send me text message updates</label></div>
        </div>
      {% endif %}
    </div>
  {% endif %}

Signup page:

  <div class="row-fluid">
    <div class="span6">
      <label class="checkbox" for="signup_email_opt_in">{% check_box "email_opt_in", class:"checkbox" %} Send me email updates</label>
    </div>
  {% if site.ask_for_mobiles? %}
  <div class="span6">
    <label class="checkbox" for="signup_mobile_opt_in">{% check_box "mobile_opt_in", class:"checkbox" %} Send me text message updates</label>
  </div>
  {% endif %}
  </div>

Signup page ACTION theme:

  {% if request.sorta_logged_in? == false or request.current_signup.has_mobile? == false %}          
    <div class="row">
      <div class="col-md-12"><div class="checkbox">{% check_box "email_opt_in", class:"checkbox" %}<label for="signup_email_opt_in">Send me email updates</label></div>
        {% if site.ask_for_mobiles? %}
        <div class="checkbox">{% check_box "mobile_opt_in", class:"checkbox" %}<label for="signup_mobile_opt_in">Send me text message updates</label></div>
        {% endif %}
      </div>
    </div>
  {% endif %}

Volunteer page:

  <div class="row-fluid">
    <div class="span6">
      <label class="checkbox" for="volunteer_signup_email_opt_in">{% check_box "email_opt_in", class:"checkbox" %} Send me email updates</label>
    </div>
    {% if site.ask_for_mobiles? %}
    <div class="span6">
      <label class="checkbox" for="volunteer_signup_mobile_opt_in">{% check_box "mobile_opt_in", class:"checkbox" %} Send me text messages</label>
    </div>
    {% endif %}
  </div>

Volunteer page ACTION theme:

 {% if request.sorta_logged_in? == false %}
    <div class="row">
      <div class="col-md-12"><div class="checkbox">{% check_box "email_opt_in", class:"checkbox" %}<label for="volunteer_signup_email_opt_in">Send me email updates</label></div>
      </div>
      {% if site.ask_for_mobiles? %}
        <div class="col-md-12"><div class="checkbox">{% check_box "mobile_opt_in", class:"checkbox" %}<label for="volunteer_signup_mobile_opt_in">Send me text messages</label></div>
        </div>
      {% endif %}
    </div>
  {% endif %}
Did this answer your question?