Wappler 3.0.0 b1
Steps to re-create - example is below
1 Create a form with a select input, data source and associate it with a POST type server action which writes the value to a database field.
2. Set up an initial value through the Value attribute.
3. Create a condition for the Disabled attribute whereby when the form is viewed, the input is disabled.
4. View the page and submit the form.
5. The preset value isn’t passed through to the form.
6. Remove the Disabled attribute.
7. The preset value IS passed through to the form.
My real world example is below. This is part of a universal payment data entry form. Sometimes the form has to be pre-populated with the currency and this input disabled so the user cannot change it. Other times, the same form needs to allow the user to select the currency.
<select id="i_payment_currency"
dmx-bind:options="currencies.data.currencies"
optiontext="symbol" optionvalue="id"
name="currency" class="input_currency"
dmx-bind:disabled="(this_payment_currency.value > 0) || (payment_editable.value == 0)"
dmx-bind:value="this_payment_currency.value">
Last updated: