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.

Dynamically populating a dropdown with data from another GF form

  1. I'd like to populate a dropdown menu with data entered on a separate form. For this project, I have groups registering on one form, and individuals affiliated with a group registering on a second form. I'd like the individuals to be able to indicate the studio that they are a part of by selecting their group's name from a dropdown menu.

    Because we anticipate a lot of groups to register, many of which may have the same name, we'd like to add additional identifying information to the dropdown, like this:

    [Group Name] in [Group's City], {Group's Country]

    I looked at Dynamically Populating Drop Down Fields, but I think I need some extra help for displaying the form data instead of blog posts.

    Here is a link to the Group registration page where the group (studio) name, city, and country fields are located. And here is a link to the individual registration page where I'd like to display the dynamically populated drop-down field for "Studio Name: Select your studio".

    Posted 11 years ago on Monday June 25, 2012 | Permalink
  2. same question fro me as well.
    have form 1 that the admin enters standard responses for future use.

    admin then uses form 2 to reply to user questions by selecting from a drop down one of the standard responses entered in form 1
    thx

    Posted 11 years ago on Sunday July 22, 2012 | Permalink
  3. Roland, can you post examples of the forms you are currently using, and let us know how it's configured? Thank you.

    Posted 11 years ago on Sunday July 22, 2012 | Permalink
  4. Hey Chris - any thoughts on my original question?

    Posted 11 years ago on Monday July 23, 2012 | Permalink
  5. Sorry, I missed that. One casualty of piggy backing onto other people's topics (not that you did.) Let me take a peak at your original question. Sorry about that.

    Posted 11 years ago on Monday July 23, 2012 | Permalink
  6. ultramel, you are going to need to change line 14 in this code:
    http://pastie.org/2105544

    That is what gets the posts to populate the drop down. You're populating the drop down with user-submitted data, from another form. It sounds like you need to get a couple pieces of information (Group Name, Group City, Group Country) from all entries from form 2 (the group registration form), then concatenate those with your punctuation and words to make it read like English [Group Name] in [Group's City], {Group's Country], then populate the drop down in form 3 (the individual practitioner form.)

    The majority of the work will replace line 14 in that code example. Line 20 will change also because you won't be using WordPress post-specific "$post->post_title".

    So that's the procedure. What else do you need help with?

    Posted 11 years ago on Monday July 23, 2012 | Permalink
  7. Hey Chris -

    Thanks for your reply. I totally understand the procedure, and I can tell that I need to change $post->post_title to something else, however what I need to change it to is a complete mystery to me. If you have an understanding of what I'll need to code here, could you share that with me? Anything would be a huge help.

    Thanks!

    Posted 11 years ago on Monday July 30, 2012 | Permalink