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.

HELP! Populate form with custom post type

  1. Good evening,
    congratulations for your support and for the great plugin!
    For several days I try in vain to implement a function: I'm working with the additional Custom Post Types plugin allows me to populate the fields with a "post type" (link to the plugin http://wordpress.org/extend/plugins/gravity-forms-custom-post-types /) my question is this: in a drop-down menu, you can display only posts written by the user type logged?
    Thank you, I await your response
    Andy

    Posted 12 years ago on Tuesday February 21, 2012 | Permalink
  2. Gaslight
    Member

    you can populate a dropdown via PHP, so yes you can do that but you need to write your own custom PHP code, check the documentation, there's an example on how to populate a dropdown; in your case you could populate with the results of a wp_query for posts belonging to a certain post type

    Posted 12 years ago on Tuesday February 21, 2012 | Permalink
  3. Hello and thanks for the answer.
    I tried various codes, including this http://www.pastie.org/3430913.
    What I can not do is this: how do I show him all the posts written by the user logged on a taxonomy? I believe that the string to change is at this point: $ posts = get_posts ("category = Business"): (unfortunately I can not: (I tried in every way! Can you give me a hand? Thank you!
    Andy

    Posted 12 years ago on Wednesday February 22, 2012 | Permalink
  4. Nobody can help me?? :(

    Posted 12 years ago on Thursday February 23, 2012 | Permalink
  5. Gaslight
    Member

    have you tried defining at the beginning of your function

    $post = $wp_query->post;

    because you're executing a function outside the wordpress loop and then calling $post... that would return empty outside a wp query

    Posted 12 years ago on Friday February 24, 2012 | Permalink