• topbloke66

    (@topbloke66)


    I have added some new fields and set them as checkboxes, however the titles do not show.

    If I switch to other field types such radio buttons or input the titles do show.

    Are you able to advise please?

    Thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter topbloke66

    (@topbloke66)

    If anyone is able to help this is still an issue.

    To add to the above it only happens when you have “Enable Attribute Grouping.” enabled and then add the checkbox’s to a custom group. It shows fine if set to the primary.

    Thanks

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Hello.

    Thank you for pointing. We are going to check that.

    Regards.

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Hello.

    Can you be more exact where you don’t see the title, backend or frontend and which page? I wasn’t able to replicate the issue. Try to disable all third party plugins to check the issue do not relate to any of them.

    Regards.

    Thread Starter topbloke66

    (@topbloke66)

    Sure, to before posting I did setup a blank wordpress and install only the CRM plugin to check it was not another plugin causing this and it was still an issue.

    It is on this page “page=wp_crm_add_new” in the admin area, I am only using the CRM plugin in the admin area and not on the Frontend.

    I have added a group called “Services” and then added check boxes to that. “Lifeline” & “CarePlan” are the two values I used.

    Here is the source code, which shows the <TH> tags are empty.

    <div id=”advanced-sortables” class=”meta-box-sortables”><div id=”services” class=”postbox custom_group” >
    <button type=”button” class=”handlediv” aria-expanded=”true”><span class=”screen-reader-text”>Toggle panel: Service</span><span class=”toggle-indicator” aria-hidden=”true”></span></button><h2 class=’hndle’><span>Service</span></h2>
    <div class=”inside”>
    <table class=”form-table”>
    <tr meta_key=”lifeline” wp_crm_input_type=”checkbox” class=”wp_crm_no_options wp_crm_required_field not_primary wp_crm_user_entry_row wp_crm_lifeline_row”>
    <th>
    </th>
    <td class=”wp_crm_user_data_row” wp_crm_attribute=”lifeline”>
    <div class=”blank_slate hidden” show_attribute=”lifeline”>Add Lifeline</div>

    <div class=”input_div wp_crm_lifeline_field wp_crm_required_field wp_crm_lifeline_div”>

    <!–<input data-random-hash=”94869″ name=”wp_crm[user_data][lifeline][94869][value]” type=’hidden’ value=”” />–>
    <input data-random-hash=”94869″ name=”wp_crm[user_data][lifeline][94869][option]” type=’hidden’ value=”lifeline” />
    <input id=”wpi_checkbox_94869″ data-random-hash=”94869″ name=”wp_crm[user_data][lifeline][94869][value]” class=”wp_crm_lifeline_field wp_crm_lifeline_field wp_crm_required_field” type=’checkbox’ value=”on” />

    </div>
    </td>
    </tr>
    <tr meta_key=”careplan” wp_crm_input_type=”checkbox” class=”wp_crm_no_options wp_crm_required_field not_primary wp_crm_user_entry_row wp_crm_careplan_row”>
    <th>
    </th>
    <td class=”wp_crm_user_data_row” wp_crm_attribute=”careplan”>
    <div class=”blank_slate hidden” show_attribute=”careplan”>Add CarePlan</div>

    <div class=”input_div wp_crm_careplan_field wp_crm_required_field wp_crm_careplan_div”>

    <!–<input data-random-hash=”86544″ name=”wp_crm[user_data][careplan][86544][value]” type=’hidden’ value=”” />–>
    <input data-random-hash=”86544″ name=”wp_crm[user_data][careplan][86544][option]” type=’hidden’ value=”careplan” />
    <input id=”wpi_checkbox_86544″ data-random-hash=”86544″ name=”wp_crm[user_data][careplan][86544][value]” class=”wp_crm_careplan_field wp_crm_careplan_field wp_crm_required_field” type=’checkbox’ value=”on” />

    </div>
    </td>
    </tr>
    </table>
    </div>
    </div>

    Thread Starter topbloke66

    (@topbloke66)

    Ok, I have done some digging in your code and found the offending line. It is in \wp-crm\lib\class_functions.php line 3534 there is an If clause:

    <?php if (@$attribute[‘input_type’] != ‘checkbox’ || isset($attribute[‘options’])): ?>

    If I remove this it works fine in the admin area. It appear the if statement is skipping the code for checkbox’s when in groups.

    I am not sure what the line of code is suppose to do, but I hope that helps?

    Thanks.

    Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Thank you for the note, we will check that and add the fix to the next release.

    Regards.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Checkbox fields not displaying the title in admin area’ is closed to new replies.