Can I use check boxes in a sign-up form?

Can I use check boxes in a sign-up form?

Creating a sign-up form online is a really productive way of growing your database and seamlessly adding data to your account. 
  1. Brand new contacts can opt-in and supply you with details about their preferences which will then help you send them emails with the information most relevant to them. Existing contacts can also send additional data about themselves to your account by submitting details via your form.
  2. Within the code of your online form you can include an ID which will add contacts into a particular Group or Groups (multiple Groups is an option) of your choice in your account.
  3. Your form can include a number of input fields for data to be inserted with your contact's details and submitted. Examples being their telephone number, company name or any piece of custom data (custom data is stored in your account my making your own custom tags in your account).
You can also include check boxes in a form which is a great way to offer options where you'd like to record a "Yes" in your data if a check box was ticked. Ideal, say, if you wanted to keep all new contacts from your signup form in one Group, but be able to use segmentation to filter these contacts and send them specific messages rather than set up Public Groups which offer preferences to your contacts.

Example 1: Custom information 

A college website has a newsletter signup on their website about a particular upcoming event. On signup new contacts are added to the "Event X Website Signup" Group that they've made for the purpose. Within the form they offer check boxes that are labelled "I'm a parent",  "I'm a student", "I work in education". In the college's NewZapp account they have custom tags named 'Parents', 'Students', 'Work in Education' and these are all set as ‘Text’ type (allows storage of free text).

Within the forms HTML code, each check box passes a set value on input.  
  1. If the checkbox IS TICKED, a value (determined in the form's code, see below) is passed to the contact’s corresponding data field.
  2. If the checkbox is NOT TICKED then no value would be passed in, and the contact’s corresponding data field is not sent a value (rather than having a ‘No’ value sent to it).
    Unlike radio buttons, no matter how many check boxes you include on a form, a person submitting will be able to pick one or more.
Here's how it would look in code for the first check box in the example form:
  1. <input name="Parent" id="Parent" type="checkbox" value="Yes" />
  2. name="Parent" being an identifier in the form html
  3. id="Parent" being the custom tag name in the NewZapp account
  4. type="checkbox" specifies that the input should be a checkbox not a text field
  5. value="Yes" gives the form something to pass to the contact's custom tag if someone ticks it (nothing passed if they don’t).  

If you didn’t specify a value attribute, then the HTML would send the value of “on” if someone ticks, and again, nothing is passed if they don’t. 

Example 2: Include checkboxes for joining a specific group 

A publisher has a newsletter signup form on their website which allows new contacts to choose to receive emails from up to 4 specialist subject Groups: Medicine, Automotive, Nutrition, and Astronomy.

In this instance, the usually ‘hidden’ GroupIds input field: 

  1.  <input type="hidden" name="GroupIds" id="MyGroupId" value="GROUP ID VALUE" /> is moved up into the main visible form and becomes type=”checkbox”:  <input type="checkbox" name="GroupIds" id="MyGroupId" value="GROUP ID VALUE" />

The GROUP ID VALUE can be found by going into Contacts in your NewZapp account, hovering over thew 3 dots on a group Group and clicking the icon that says ‘Edit’. The ID can be added to your clipboard from here.

So, for the 4 different Groups you can create a checkbox group like for example:

  1.       <label for=”Medicine”>Medicine</label>
  2.       <input name="GroupIds" id="Medicine" type="checkbox" value="123456" /><br>
  3.       <label for=”Automotive”>Automotive</label>
  4.       <input name="GroupIds" id="Automotive" type="checkbox" value="456237" /><br>
  5.       <label for=”Nutrition”>Nutrition</label>
  6.       <input name="GroupIds" id="Nutrition" type="checkbox" value="111223" /><br>
  7.       <label for=”Astronomy”>Astronomy</label>
  8.       <input name="GroupIds" id="Astronomy" type="checkbox" value="743999" /></fieldset>

When the <form> is submitted, the contact will be added to each Group whose checkbox has been selected.

Notice that we have shown the use of the <label> tag for each checkbox. We can replace each checkbox’s id attribute with a unique name in order for the <label> to be able to target each checkbox as shown.

Example 3: Use checkboxes for ‘Yes/No’ Custom data

A recruitment agency has a newsletter sign-up form that includes checkboxes for the kind of vacancy contacts are interested in: Full Time, Part Time, Contract. New contacts can tick more than one checkbox and each checkbox updates their Contact Card to reflect these preferences.

Within the form’s HTML code, each checkbox should only pass a value of true when selected, false if not. Any other value will also be false.

 e.g. for this example, the input fields would look like this:

  1.       <label for=”myPartTime”>Part Time</label>
  1.       <input name=”PartTime” id=”myPartTime” type=”checkbox” value=true />
  1.       <label for=”myFullTime”>Full Time</label>
  1.       <input name=”FullTime” id=”myFullTime” type=”checkbox” value=”true />
  1.       <label for=”myContract”>Contract</label>
  1.       <input name=”Contract” id=”myContract” type=”checkbox” value=”true” />

 So, if the ‘Full Time’ checkbox is selected, when the form is submitted the Custom data section of the Contact Card will show ‘Full Time’ as ticked.

    • Related Articles

    • What is a Custom Field?

      Adding a Custom Field to your account so that you can import more data is only going to enhance the ability of personalising your communications, where you can then Segment based on data and even personalise your comms within the Editor based on ...
    • How to add an online sign-up form for your website

      NewZapp can generate code for you to add a simple sign-up form to your website and help grow your audience. - Go to Account Settings and then Sign-Up Form - Click the ‘Copy to clipboard ’ button - Paste the code into any HTML page on your website ...
    • How to collect more data when a contact signs up

      With the NewZapp sign up form, you can collect the basic information about your contact such as email address (required), first name, last name and company name however there may be occasions where you wish to collect more information to offer ...
    • 10 myths about the GDPR

      If I haven’t sent a reconfirmation email to my subscribers I can’t send to them Myth! You can still send to your subscribers if you can stand behind one of the 6 lawful basis for processing data. Consent is the only way to meet the standards set by ...
    • What's Preview Text and how do I use the 'Johnson Box'?

      What's the 'Johnson Box'? The Johnson Box is the preview text, this (sometimes referred to as pre-header text) is the very first line of real text in an email, which appears in the Inbox. It's a preview of the email's content. Which you can see ...