Title: [Plugin: Simple Fields] Problems with drop-down menu values
Last modified: August 20, 2016

---

# [Plugin: Simple Fields] Problems with drop-down menu values

 *  Resolved [cokeyblokey](https://wordpress.org/support/users/cokeyblokey/)
 * (@cokeyblokey)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-simple-fields-problems-with-drop-down-menu-values/)
 * I’m having a problem returning the value for drop-down menu values. I have a 
   simple fields drop down in a page template within the WP dashboard, so I can 
   choose a colour for an item via a dropdown on the page edit screen. If I use 
   this:
 * > `simple_fields_get_post_value(get_the_id(), array(4, 1), true);?>`
 * then the value returned is ‘green’ – the value I have chosen in the simple field
   dropdown within the WP dashboard.
 * However, I want to do this using the ‘slug’ instead of the ‘meta-key’:
 * > `<?php $breadcrumbcolor = simple_fields_value('breadcrumb_colour');?>`
 * but the value returned is ‘dropdown_num_2’.
 * I can see how I can use ‘dropdown_num_2’ as a class in the css but it’s going
   to be much more labour intensive AND if I change anything in the simple fields
   setup – the order of the values etc, it will mess up the css as the ‘dropdown_num’
   changes.
 * Is there anyway to return the actual value using the slug method?
 * [http://wordpress.org/extend/plugins/simple-fields/](http://wordpress.org/extend/plugins/simple-fields/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Contributor [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * (@eskapism)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-simple-fields-problems-with-drop-down-menu-values/#post-3113180)
 * Ah, yes that return value is a bit strange for some.
 * Hold on a day or day and a new version of simple fields will be out and that 
   version will have a very good solution to your problem – promise!
 *  Plugin Contributor [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * (@eskapism)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-simple-fields-problems-with-drop-down-menu-values/#post-3113225)
 * Hi again! With the latest version of simple fields you can now do this:
 *     ```
       $breadcrumbcolor = simple_fields_value('breadcrumb_colour', NULL, "extended_return=1");?>
   
       echo "The selected color is: " . $breadcrumbcolor["selected_value"];
       ```
   
 * Try it and let me know if it works.
 *  Thread Starter [cokeyblokey](https://wordpress.org/support/users/cokeyblokey/)
 * (@cokeyblokey)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-simple-fields-problems-with-drop-down-menu-values/#post-3113317)
 * Wow, how rude of me – I never got back to say that this worked for me. Apologies
   and thanks!
 *  [sugardaddy](https://wordpress.org/support/users/sugardaddy/)
 * (@sugardaddy)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-simple-fields-problems-with-drop-down-menu-values/#post-3113319)
 * Hi Thernström,
    I’m trying to do the same but with a dropdown which has multiple
   values selectable. And this code doesn’t return anything. I think I tried every
   possible combinations 😉 Thanks for your help !
 *  [sugardaddy](https://wordpress.org/support/users/sugardaddy/)
 * (@sugardaddy)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-simple-fields-problems-with-drop-down-menu-values/#post-3113320)
 * Got it !
 *     ```
       $intervenants = simple_fields_value('intervenants');
         $intervenant = $intervenants['selected_values'];
         foreach($intervenant as $name) {
           echo $name;
         };
       ```
   
 * I didn’t expect to use a foreach…
 *  Plugin Contributor [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * (@eskapism)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-simple-fields-problems-with-drop-down-menu-values/#post-3113321)
 * Nice to hear that you solved it. Also very kind of you to share you solution 
   with the other users of this support forum. Thanks!
 *  [sugardaddy](https://wordpress.org/support/users/sugardaddy/)
 * (@sugardaddy)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/plugin-simple-fields-problems-with-drop-down-menu-values/#post-3113322)
 * The secret of a long life resides in the share 😉
    I always proceed like that.
   But, sometimes, I got real questions hard to solve by myself… check the other
   recent topics ! Again, thanks a lot for your work on this plugin !
 *  [Rabassa](https://wordpress.org/support/users/rabassa/)
 * (@rabassa)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/plugin-simple-fields-problems-with-drop-down-menu-values/#post-3113323)
 * Hello!
 * I love this plugin!
    I need to read what the selectable values for a specific
   drop down field so that I may create a drop down menu on the front end for the
   user.
 * Example, I have a list of industries that the user selects when creating their
   posts. I’d like to create a drop down menu on a specific page that is the same
   as the drop down in the simple fields – I am doing this in PHP and it’s for the
   site visitor to be able to select by a specific industry. This page needs to 
   build this drop down dynamically incase the client decides to add/change the 
   industries available in simple fields.
 * Hope this makes sense.
    thanks, rich
 *  [Rabassa](https://wordpress.org/support/users/rabassa/)
 * (@rabassa)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/plugin-simple-fields-problems-with-drop-down-menu-values/#post-3113324)
 * Also,
 * What happened to the required fields checkbox? I don’t see it in this latest 
   version of Simple Fields.
 * THanks,
    rich

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘[Plugin: Simple Fields] Problems with drop-down menu values’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-fields_fafafa.svg)
 * [Simple Fields](https://wordpress.org/plugins/simple-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-fields/reviews/)

## Tags

 * [dropdown](https://wordpress.org/support/topic-tag/dropdown/)

 * 9 replies
 * 4 participants
 * Last reply from: [Rabassa](https://wordpress.org/support/users/rabassa/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/plugin-simple-fields-problems-with-drop-down-menu-values/#post-3113324)
 * Status: resolved