The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Simple Fields
retrieving fields' names instd of slugs (2 posts)

  1. lucaboccianti
    Posted 3 years ago #


    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.



  2. Pär Thernström
    Plugin Author

    Posted 3 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic