Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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.

    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)

    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

    Thread Starter topbloke66

    (@topbloke66)

    Ok thank you.

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