Support » Plugin: Simple Fields » retrieving fields' names instd of slugs

  • hello,

    I use this code to obtain a list of label-values to build a table:

    $field_group_values = simple_fields_fieldgroup('scheda_tecnica');
    foreach($field_group_values as $key => $value) {
      echo '<div class="label">' . $key . '</div>';
      echo '<div class="value">' . $value . '</div>';

    the problem is that in $key I obtain the slug for the field, something ugly with undercores etc., while I’d prefer to obtain the nice name of the field.

    is that possibile? I have the sensation I’m missing something obvious.


Viewing 1 replies (of 1 total)
  • Plugin Author Pär Thernström


    Can you try to pass “extended_return=1” as second arg, like:

    $field_group_values = simple_fields_fieldgroup('scheda_tecnica');

    I don’t remember exactly how the output is, but perhaps that fixes it. Otherwise I may be able to add another argument that fixes that. Let me know if the above works first however!

Viewing 1 replies (of 1 total)
  • The topic ‘retrieving fields' names instd of slugs’ is closed to new replies.