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.

Prepopulate dropdown with name of posts

  1. Hi

    I have tried to complete this customization myself after reading the tutorial.

    Dynamically Populating Drop Down Fields
    http://www.gravityhelp.com/documentation/page/Dynamically_Populating_Drop_Down_Fields

    And I gave it a go… and haven't seen any errors pop up… But haven't found where the post titles are suppose to show up in the gravity form admin area.

    Here is the code that I slightly altered for pastebin:
    http://pastebin.com/hJkRtLCc

    So now I am unsure whether this is the function I need. Here is what I am looking for :

    We're using WordPress as a store directory for a local mall and we will give the tenants a hidden page where they can send changes to their contact. We have a category of posts called store directory and I though we could pre-populate a drop down menu with the names of the store from the category of post.

    For example:

    Hardware Store
    Grocery Store
    Restaurant

    If they all had a published post then it would show up in the form. If the business left the mall the listing would get deleted and the option would get automatically removed from the form.

    I have a feeling Gravity Forms can do this I just not sure I have the right code (see above) to do it.

    Any help or assistance would be great!

    Posted 12 years ago on Tuesday June 12, 2012 | Permalink
  2. bump? I would really like to get this implemented… Any help would be awesome!!!

    Posted 12 years ago on Wednesday June 13, 2012 | Permalink
  3. See if this post is of any help:

    http://www.gravityhelp.com/forums/topic/dynamically-populating-a-field-with-category-names

    Posted 12 years ago on Wednesday June 13, 2012 | Permalink
  4. That is close… But It is actually posts titles with in the category… 

    So every post that is part of "Store Directory" would be part of the drop down.

    http://trailbaycentre.com/store-directory/subway/

    So "Subway" would be an option in the drop down menu… And if Subway were to ever leave to leave the mall then we would delete the post and it would get automatically removed from the form.

    ps. We did all of the tenant submissions using Gravity Forms and it was a godsend… The way we were able to send it to the mall administration for review and the copy editor was a real time saver… Worth every penny! We just like to do this one more interaction and the site would be complete.

    Posted 12 years ago on Wednesday June 13, 2012 | Permalink
  5. Ok… I have made some more progress in my quest… I am actually looking to:
    Allow field to be populated dynamically buy query string. And that query being all the posts in the store directory category.

    As long as that is what I need to do to… Then I can hire someone to do that. As it seems a little over my coding ability. I just didn't want to send him down a wild goose chase without providing some resources as to how to do it.

    Posted 12 years ago on Wednesday June 13, 2012 | Permalink