Title: checkbox custom field missing label?
Last modified: September 10, 2019

---

# checkbox custom field missing label?

 *  Resolved [angeloio](https://wordpress.org/support/users/angeloio/)
 * (@angeloio)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/checkbox-custom-field-missing-label/)
 * Dear All. A very good morning to everyone
 * I have just installed this great plugin and I am trying to learn it developer-
   wise.
    I created a couple of custom fields successfully. However I noticed that
   checkbox field does not print any label/title. My code is the following:
 *     ```
               wpas_add_custom_field( 'confirmation',
                       array(
                               'title' => __( 'Confirmation', 'wpas' ),
                               'field_type' => 'checkbox',
                               'required' => true,
                               'label'      => 'Confirmation',
                               'options' => array(
                                       'accept_terms' => 'I agree to the terms of use, for the above product/service request'
                                       ),
                               )
                       );
       ```
   
 * After some checking I noticed that in the respective class ( **/wp-content/plugins/
   awesome-support/includes/custom-fields/field-types/class-cf-checkbox.php** ) 
   there is no code to produce the title:
 *     ```
                       foreach ( $this->options as $option_id => $option_label ) {
                               $selected = in_array( $option_id, $values ) ? 'checked="checked"' : '';
                               $output .= sprintf( "<div class='wpas-checkbox'><label><input type='checkbox' name='%s' value='%s' %s> %s</label></div>", $name_attr, $option_id, $selected, $option_label );
       ```
   
 * Is this a core bug or am I doing something wrong ?
 * I thank you all in advance
 * Kind Regards

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Yeison Baron](https://wordpress.org/support/users/yeisonbp/)
 * (@yeisonbp)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/checkbox-custom-field-missing-label/#post-11918752)
 * Hi [@angeloio](https://wordpress.org/support/users/angeloio/),
 * The most we could do is to share you the documentation regarding the core custom
   fields from the link below:
 * – [https://getawesomesupport.com/documentation/awesome-support/custom-fields/](https://getawesomesupport.com/documentation/awesome-support/custom-fields/)
 * Another option could be using the custom fields add-on that allows you to create
   custom fields without coding:
 * [https://getawesomesupport.com/addons/custom-fields/](https://getawesomesupport.com/addons/custom-fields/)
 * Regards.
 *  Thread Starter [angeloio](https://wordpress.org/support/users/angeloio/)
 * (@angeloio)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/checkbox-custom-field-missing-label/#post-11920800)
 * Hello Sir.
 * I don’t know if you are part of the Awesome Support plugin development team or
   not, but I am pretty sure this is a core bug!
    There are some others too as other
   core custom field classes do not apply order or required attributes.
 * Do you have any idea where to report and confirm ?
 * Many thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘checkbox custom field missing label?’ is closed to new replies.

 * ![](https://ps.w.org/awesome-support/assets/icon-256x256.png?rev=1849681)
 * [Awesome Support - WordPress HelpDesk & Support Plugin](https://wordpress.org/plugins/awesome-support/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/awesome-support/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/awesome-support/)
 * [Active Topics](https://wordpress.org/support/plugin/awesome-support/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/awesome-support/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/awesome-support/reviews/)

## Tags

 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)

 * 2 replies
 * 2 participants
 * Last reply from: [angeloio](https://wordpress.org/support/users/angeloio/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/checkbox-custom-field-missing-label/#post-11920800)
 * Status: resolved