I want to populate a field with category names, how can I do this?
I want to populate a field with category names, how can I do this?
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.
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.
If the Store Names are categories in your WordPress site you can use the Post Category field to display them.
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.