• Resolved Alexey

    (@asel)


    Hi there!

    If I indicate label for checkbox field type than I get multiple results on the front.

    For example Template 0 is

    [fruits]
    label = Fruits
    type = checkbox
    value = apple # orange # banana
    output = true

    I checked apple and orange for any post.

    To display cft on the front i use [cft template=0]

    As result i’ll get apple and orange three times on the front.
    If label isn’t set for checkbox field it works fine.

    Of course use labels must be checked at the options page.

    https://www.ads-software.com/extend/plugins/custom-field-template/

Viewing 1 replies (of 1 total)
  • Thread Starter Alexey

    (@asel)

    I fixed the problem!!! ??

    custom-field-template.php Version: 2.0.1

    3607 if (!empty($val['label']) && !empty($options['custom_field_template_replace_keys_by_labels']))
    3608                    $key = stripcslashes($val['label']);
    3609                  if ($val['hideKey'] != true && $num == 0)
    3610                    $output .= '<dt>' . $key . '</dt>' . "\n";

    To solve the problem you need to rename $key (line 3608, 3610) to $key_fix for example.

    screenshot

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Custom Field Template] Checkbox and label problem’ is closed to new replies.