Title: Checkbox checked by default
Last modified: August 22, 2016

---

# Checkbox checked by default

 *  [bgrobertson](https://wordpress.org/support/users/bgrobertson/)
 * (@bgrobertson)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/checkbox-checked-by-default/)
 * Hi, I am using PMPro Register Helper to add fields to checkout. I am trying to
   add a few checkboxes for users to select their interests. They are displaying
   correct on the page and they are displaying in the backend admin page, but the
   only problem is that even if a user only checks one box all are checked in their
   profile in the backend. Have I formatted checkboxes incorrectly? Here’s the code:
 *     ```
       $fields[] = new PMProRH_Field(
               "interests",              // input name, will also be used as meta key
               "checkbox",                 // type of field
               array(
                  "text"=>"Swimming",
                  "class"=>'interests',
                  "profile"=>true    // show in user profile
               ));
           $fields[] = new PMProRH_Field(
               "interests",              // input name, will also be used as meta key
               "checkbox",                 // type of field
               array(
                  "text"=>"Running",
                  "class"=>'interests',
                  "profile"=>true,    // show in user profile
                  "showmainlabel"=>false
               ));
           $fields[] = new PMProRH_Field(
               "interests",              // input name, will also be used as meta key
               "checkbox",                 // type of field
               array(
                  "text"=>"Cycling",
                  "class"=>'interests',
                  "profile"=>true,    // show in user profile
                  "showmainlabel"=>false
               ));
           $fields[] = new PMProRH_Field(
               "interests",              // input name, will also be used as meta key
               "checkbox",                 // type of field
               array(
                  "text"=>"Triathlon",
                  "class"=>'interests',
                  "profile"=>true,    // show in user profile
                  "showmainlabel"=>false
               ));
       ```
   
 * Thanks in advance!
 * [https://wordpress.org/plugins/paid-memberships-pro/](https://wordpress.org/plugins/paid-memberships-pro/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Kim Coleman](https://wordpress.org/support/users/kimannwall/)
 * (@kimannwall)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/checkbox-checked-by-default/#post-5899837)
 * Yes – your “input name” needs to be unique. So you could update each to interests_running,
   interests_cycling, …

Viewing 1 replies (of 1 total)

The topic ‘Checkbox checked by default’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/paid-memberships-pro_f1dacb.svg)
 * [Paid Memberships Pro - Content Restriction, User Registration, & Paid Subscriptions](https://wordpress.org/plugins/paid-memberships-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/paid-memberships-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/paid-memberships-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/paid-memberships-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/paid-memberships-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/paid-memberships-pro/reviews/)

## Tags

 * [register helper](https://wordpress.org/support/topic-tag/register-helper/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kim Coleman](https://wordpress.org/support/users/kimannwall/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/checkbox-checked-by-default/#post-5899837)
 * Status: not resolved