Support » Plugin: Simple Fields » Get Simple Fields Field Name or Description

  • Resolved iammary

    (@iammary)


    Hello!

    First and foremost, I would like to thank you for this amazing plugin.

    I have one question though. Is there a way that we could pull up the field name or description based on the slug parameter? Just like simple_fields_value(slug) option.

    Thanks again! 🙂

    http://wordpress.org/extend/plugins/simple-fields/

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

    (@eskapism)

    Thanks for the kind words. Remember to give it a nice rating if you like it! 🙂

    And for your question, you could try this:

    // Fetch field info using a method in the simple fields class
    global $sf;
    $field_info = $sf->get_field_by_slug($your_field_slug, $your_fieldgroup_slug);
    
    // Show the output. Somewhere there the description should be...
    print_r($field_info);

    Maybe I should add the field name and description automatically to the output when using Extended Return Values. Probably more users/developers than you who need that info. Anyway, let me know if you get it to work or if you run into any problems!

    iammary

    (@iammary)

    Hello!

    Thank you for the prompt response. I tested it and it worked! You saved my life! Thanks a lot.

    P.S. Already gave the plugin a 5-star rating.

    Thanks again!!!

    Thank you for this trick.
    Actually, I tried it for a checkbox list and this doesn’t work.

    Help is appreciated…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Get Simple Fields Field Name or Description’ is closed to new replies.