02 Mar 2020 16:51:47 Bruce Wilkie posted:
How do I dynamically populate a select menu?
I'd like one static <option> just labelled as "choose..." and then the rest of the options populated from a server action that I've created listing the options.
I can see there's an 'Options Properties' area in App connect when I select the select menu, but it doesn't seem to work when I try selecting data source, values and text in the 3 boxes from my Server Action.
Code that it's creating when I do this below:
<select name="product_c1" id="product_c1" dmx-bind
ptions="serverconnectListC1" optiontext="querySelectC1.product_cat_name" optionvalue="querySelectC1.product_cat_id">
I've tested the Server Action to make sure that works and it's showing the results just fine when I try the 'Open in browser' button to test it.
Would you be able to have a look and let me know how to do this so it works?
thanks in advance