Title: Gravity Forms &#8211; Dynamically populate drop down menu&#8230; WITH CUSTOM FIELDS!
Last modified: August 21, 2016

---

# Gravity Forms – Dynamically populate drop down menu… WITH CUSTOM FIELDS!

 *  [Olly – OWMC](https://wordpress.org/support/users/olly-owmc/)
 * (@olly-owmc)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/gravity-forms-dynamically-populate-drop-down-menu-with-custom-fields/)
 * Hi,
 * Not getting the best of support from Gravity Forms. I have a dropdown menu in
   my form.
 * I want to populate this drop down with text from a custom field in a custom post
   type. [Using this code](http://www.gravityhelp.com/documentation/page/Dynamically_Populating_Drop_Down_Fields#The_Code).
   I am able to populate the menu with the posts’ titles. But how do I modify my
   code so that it displays the values from my custom field instead of the title?
 * Gravity Forms support just told me I’m going to have to customise the code snippet.
   Instead of get_posts, I will need to use a WordPress function to get all my custom
   field names. But that’s as far as the support has gone so far.
 * I’ve used get_post_meta($post_id, ‘custom_field_name’, false) like so:
 * [http://pastebin.com/2fmqRb3T](http://pastebin.com/2fmqRb3T)
 * (I’ve replaced ‘custom_field_name’ with the actual field name obviously)
 * But it just returns a drop down menu with blank choices repeated. There appear
   to be 8 blank choices which is the number of posts I’m calling within that category.
   So something is right, but I’m really not great with php. Can anyone tell me 
   where I’m going wrong?
 * Any advice, tutorials… anything, this has stunted me for days.

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

 *  [Canned Ink](https://wordpress.org/support/users/canned-ink/)
 * (@canned-ink)
 * [12 years ago](https://wordpress.org/support/topic/gravity-forms-dynamically-populate-drop-down-menu-with-custom-fields/#post-4392939)
 * I know it’s been a while, but I’m wondering if you ever found a solution to this,
   or maybe even a tutorial or two for the dynamic dropdown population problem.
 * I’m trying to write something that will allow for four drop-downs (year, make,
   model, trim level) so that you are only presented with the ‘models’ available
   based on your ‘make’ selection, etc etc.
 * Any lucky finding any info on how to easily integrate this with Gravity Forms?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years ago](https://wordpress.org/support/topic/gravity-forms-dynamically-populate-drop-down-menu-with-custom-fields/#post-4392940)
 * If you require assistance then, as per the [Forum Welcome](http://codex.wordpress.org/Forum_Welcome#Where_To_Post),
   please post your own topic instead of tagging onto someone else’s topic.
 * I am now closing this 6 month old topic as it references an older version of 
   WordPress.

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

The topic ‘Gravity Forms – Dynamically populate drop down menu… WITH CUSTOM FIELDS!’
is closed to new replies.

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [dropdown](https://wordpress.org/support/topic-tag/dropdown/)
 * [forms](https://wordpress.org/support/topic-tag/forms/)
 * [functions](https://wordpress.org/support/topic-tag/functions/)
 * [gravity](https://wordpress.org/support/topic-tag/gravity/)
 * [menu](https://wordpress.org/support/topic-tag/menu/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [populate](https://wordpress.org/support/topic-tag/populate/)

 * 2 replies
 * 3 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/gravity-forms-dynamically-populate-drop-down-menu-with-custom-fields/#post-4392940)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
