Hi, I have a Dynamic DropDown field in a form. I want to add a custom HTML data attribute to each of the Dropdown's options. Something like the following:
<option value="1" data-custom_attr="value_1">Option 1</option>
<option value="2" data-custom_attr="value_2">Option 2</option>
<option value="3" data-custom_attr="value_3">Option 3</option>
What I'm looking for is a filter that will allow me to modify each option's html so I can add my data attributes.
I haven't been able to find a solution in the Formidable docs.
Can anyone help? Thanks in advance, Ian
Hi Rob,
Thanks for your input. Since posting my question I have been looking at a different approach to what I need to achieve. I think I'm going to abandon the Data Attributes idea and instead use a hidden lookup field that gets the data I need when the Dynamic Dropdown option is changed client side.
Cheers, Ian
Please login or Register to submit your answer