Gravity Forms - Drop Down based of entries from Database

I am new to WordPress and I work with the plugin Gravityforms.

I would like to know how to retrieve the data from a table in my database in a Dropdown, so that when I open my page there is a Dropdown field whose data comes from my database.

If anyone has an idea of how I can go about it, or write the code etc. It would be really helpful.

Thanks in advance.

1

1 Answer

Gravity Forms has a great example of how to populate Drop Down fields dynamically via hooks in the link below. In your case, you would need to fetch your entries via the GFAPI::get_entries() method rather than WordPress' get_posts() function.

If you don't feel comfortable customizing the code examples, Gravity Forms Populate Anything provides point-and-click UI for populating any choice-based fields (including Drop Downs) and support for filtering which entries get populated.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like