Comma separate checkbox fields
-
I’ve added a bit of code in the shortcode function (at line 495) to make a checkbox show as comma separated —
//if the field is a checkbox field elseif(is_array($field_value) && $field["type"] == "checkbox" ) { //sort the array by key ksort($field_value); $field_values = ""; // Concatenate field values into string separated by a comma foreach ($field_value as $field => $value) { if($value !== "") { $field_values .= $value . ", "; } } $field_values = trim($field_values, ', '); // strip the last ', ' space from the end of the string $list_html .= "<td class='sort-$i $nowrap $tdClass'>$field_values</td>"; }May be worth an adding in (or as an option) in a future release?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Comma separate checkbox fields’ is closed to new replies.