Data in field

No … just replace $ MAYBE VALUE with the amount of dollars you want to be displayed when the users select MAYBE.

So, here’s an example:

No = $500
Yes = $1000
Maybe = 250$

Then it will be:

dmx-bind:value="inp_additionalticket.value == 'No' ? '$500' : inp_additionalticket.value == 'Yes' ? '$1000' : '$250' "

Ok, I change something, I will send you my final select field and total field. This morning everything changed. I was trying to apply you colde changing it but I have something wrong.

This is the selct field:

                                <option value="1">Welcome Reception</option>

                                <option value="2">Day one only tiecket</option>

                                <option value="3">Day two only ticket</option>

                                <option value="4">Day one/Day Two tickets</option>

                                <option value="5">Welcome Reception/Day one tickets</option>

                                <option value="6">Welcome Reception/Day two tickets</option>

                                <option value="7">Welcome Reception/Day one/Day two tickets</option>

                            </select>

This is the total field:

 <input type="text" class="form-control" id="inp_TOTAL" name="TOTAL" dmx-bind:value="inp_additionalticket.value == 'Welcome Reception' ? '$250' : inp_additionalticket.value == 'Day one only tiecket' ? '$350' : inp_additionalticket.value == 'Day two only ticket' ? '$350' : inp_additionalticket.value == 'Day one/Day Two tickets' ? '$700' : inp_additionalticket.value == 'Welcome Reception/Day one tickets' ? '$600' : inp_additionalticket.value == 'Welcome Reception/Day two tickets' ? '$600' : '$950' " aria-describedby="TOTAL_help">

the final result only shows $950,

I hope I did explain well, My first language is not english

Please post your page code, as it’s not really clear what are you doing.

This is the select field:

this is the total field:

Please post the code, I can’t copy anything from your screenshots…

This is the total field:

                        <label for="inp_TOTAL" class="col-sm-2 col-form-label">Total:</label>

                        <div class="col-sm-2">

                            <input type="text" class="form-control" id="inp_TOTAL" name="TOTAL" dmx-bind:value="inp_additionalticket.value == 'Welcome Reception' ? '$250' : inp_additionalticket.value == 'Day one only tiecket' ? '$350' : inp_additionalticket.value == 'Day two only ticket' ? '$350' : inp_additionalticket.value == 'Day one/Day Two tickets' ? '$700' : inp_additionalticket.value == 'Welcome Reception/Day one tickets' ? '$600' : inp_additionalticket.value == 'Welcome Reception/Day two tickets' ? '$600' : '$950' " aria-describedby="TOTAL_help">

                        </div>

                    </div>

This is the select field:

                        <label for="inp_PRODUCTO" class="col-sm-2 col-form-label">Product</label>

                        <div class="col-sm-6">

                            <select id="inp_PRODUCTO" class="form-select" name="PRODUCTO">

                                <option value="1">Welcome Reception</option>

                                <option value="2">Day one only tiecket</option>

                                <option value="3">Day two only ticket</option>

                                <option value="4">Day one/Day Two tickets</option>

                                <option value="5">Welcome Reception/Day one tickets</option>

                                <option value="6">Welcome Reception/Day two tickets</option>

                                <option value="7">Welcome Reception/Day one/Day two tickets</option>

                            </select>

I was looking at the last code that you send me and is happening the same. Doesn’t change the value if I placed it exactly as you send

Because your option values are 1, 2, 3 etc and not Yes, No
You need to check this in the expression i sent you.

Thanks, I just changed it, you was right but anyway is showing $950 only. This is the fix:

                            <input type="text" class="form-control" id="inp_TOTAL" name="TOTAL" dmx-bind:value="inp_additionalticket.value == '1' ? '$250' : inp_additionalticket.value == '2' ? '$350' : inp_additionalticket.value == '3' ? '$350' : inp_additionalticket.value == '4' ? '$700' : inp_additionalticket.value == '5' ? '$600' : inp_additionalticket.value == '6' ? '$600' : '$950' " aria-describedby="TOTAL_help">

Unless I don’t understand what you are trying to do, I think you may be over thinking it? Why not just use your dollar figures as the select values?

<select id="inp_PRODUCTO" class="form-select" name="PRODUCTO">
           <option value="1000.00">Welcome Reception</option>
           <option value="2000.00">Day one only tiecket</option>
           <option value="3000.00">Day two only ticket</option>
           <option value="4000.00">Day one/Day Two tickets</option>
           <option value="5000.00">Welcome Reception/Day one tickets</option>
           <option value="6000.00">Welcome Reception/Day two tickets</option>
           <option value="7000.00">Welcome Reception/Day one/Day two tickets</option>
 </select>

Then you can simply just bind the value of your select to your input field. (Although it makes the input field unnecessary).

1 Like