Home › Forums › Quform WordPress › Dynamic Population of Dropdown with posts › Reply To: Dynamic Population of Dropdown with posts
November 16, 2019 at 2:54 am #30240
Samurai
Participant
Hi,
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
David