Home › Forums › Quform WordPress › Dynamic Population of Dropdown with posts
- This topic has 5 replies, 3 voices, and was last updated 5 years, 3 months ago by
Samurai.
- AuthorPosts
- January 18, 2018 at 1:00 am #23914
MarinusElgaard
ParticipantHi Theme Catcher,
I’m doing a website for a customer that sells travels.
Every individual travel is a custom post type.When a customer wants to book a specific travel they do it through QuForm on a separate page.
All travels is listed in a dropdown which I put in manually.Is it possible to populate the dropdown automatically so everytime a new “travel” is added as a post. It’s automatically added to the QuForm for customers to choose?
Kind Regards
A Happy customerAttachments:
You must be logged in to view attached files.January 22, 2018 at 11:11 am #23980Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
January 22, 2018 at 12:39 pm #23985MarinusElgaard
ParticipantThanks a lot for the answer. It’s working fine!
November 16, 2019 at 2:54 am #30240Samurai
ParticipantHi,
I would like to achieve the same, but with optgroup. I presume I would need to create an array like this:
[
[‘optgroup_text_that_will_be_displayed’ => [
[‘label’ => ‘a text label’, ‘value’ => ‘a text value’],
[‘label’ => ‘a text label’, ‘value’ => ‘a text value’],
[‘label’ => ‘a text label’, ‘value’ => ‘a text value’]
],
[‘optgroup_text_that_will_be_displayed’ => [
[‘label’ => ‘a text label’, ‘value’ => ‘a text value’],
[‘label’ => ‘a text label’, ‘value’ => ‘a text value’],
[‘label’ => ‘a text label’, ‘value’ => ‘a text value’]
]
]Could you advise?
Thanks
DavidNovember 20, 2019 at 9:56 am #30257Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
November 21, 2019 at 3:28 am #30263Samurai
ParticipantGreat! Thanks
- AuthorPosts
- You must be logged in to reply to this topic.