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 field with category names

  1. I want to populate a field with category names, how can I do this?

    Posted 12 years ago on Thursday August 4, 2011 | Permalink
  2. Do you mean you want to populate a drop down with category names, or radio buttons or checkboxes? What will your visitors do with the category names you display to them and what are you going to do with their choice?

    Please post a little more information about how you want to display your category names (I assume post categories?) and someone will be able to point you in the right direction.

    Posted 12 years ago on Thursday August 4, 2011 | Permalink
  3. I have a list of store names under a parent category stores. I want to populate a dropdown of store name choices for the user to choose from. the store name chosen will be used to determine what category the post should be in.

    Posted 12 years ago on Friday August 5, 2011 | Permalink
  4. If the Store Names are categories in your WordPress site you can use the Post Category field to display them.

    Posted 12 years ago on Friday August 5, 2011 | Permalink
  5. Here's a screenshot of configuring this in the form editor:
    http://minus.com/mcGfCqx

    Add a Post Field of the type "Category", then click "Select Categories" since you just want to show children of Stores here. That will populate your drop down with just children of Stores and when selected by your visitor will populate the category for the post.

    You can see this in action in a sample form here:
    http://gravity.chrishajer.com/submit-a-store-review/

    After your submission, you will see the post on the home page of the site in the category you selected: http://gravity.chrishajer.com/

    If you have any more questions, please let us know.

    Please note: if you add child categories under "Stores" at some point, you will need to manually add them to this form (edit the field and check the new categories to include them.) New children will not appear in the form drop down automatically.

    Posted 12 years ago on Saturday August 6, 2011 | Permalink