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)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘checkbox custom field missing label?’ is closed to new replies.