I have a populating drop down list that I am trying to select an option on form prefill.
The data for the drop down options is also populated on prefill.
Once the form is loaded the data is correct and the options for selection in the drop down match the data. However, the drop down has no value selected; it shows blank value.
is it possible to have a value selected as part of prefill?
Using the browser developer tools I can see that the <select> field has the correct values for the <option> elements. But I notice that the drop down also has a <span> element that gets populated if I make a selection from the active form, but it is not populated from the form prefill.
I have another drop down on the form which is a 'drop down list' that behaves as expected - I can set a selected value from using form prefill. Is there a difference between a 'populating drop down' and a 'drop down list' that I need to consider?
This is in Composer.
I just tried this and it worked fine for me, here is a simple example setting the values using initial value
The drop down ends up showing 'Two'
<field name="Values" type="Field-TextField" styles="styleset.size.medium"> <setproperty name="label" value="Values"/> <setproperty name="data.initial.value" value="v1|One,v2|Two,v3|Three"/> </field> <field name="DDL" type="Field-DropDownList-Populating" styles="styleset.size.medium"> <setproperty name="label" value="DDL"/> <setproperty name="data.initial.value" value="v2"/> <setproperty name="linked.field" value="../Values"/> </field>
Removing the initial values and setting the values thru prepop also worked for me
</AvokaSmartForm> <section1><subsection1> <Values>v1|One,v2|Two,v3|Three</Values> <DDL>v2</DDL> </subsection1> </section1></AvokaSmartForm>