PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

List Custom Post Type Titles As Dropdown in Form

  1. We have a form, and in that form there will be a drop down for people to choose what type of widget they would like. We have a custom post type called "Widgets" where the admin of the site can add widgets. I'd like to list the titles of the widget CPT in the drop down on the form. HOW?

    thanks.

    Posted 12 years ago on Wednesday May 30, 2012 | Permalink
  2. bump: I read this: http://www.gravityhelp.com/documentation/page/Dynamically_Populating_Drop_Down_Fields

    and i can't seem to get the drop down to populate. what's the parameter name?

    Posted 12 years ago on Wednesday May 30, 2012 | Permalink
  3. David Peralty

    I don't know if you can use WordPress' built-in
    get_posts('numberposts=-1&post_status=publish');
    for custom post types.

    I think if you can get the query to pull from your custom post type, then you should be good to go using the information on that page.

    Posted 12 years ago on Wednesday May 30, 2012 | Permalink