Hi everyone,I’m working on a form in Chronoforms and I have a question:
-
I have a dropdown field with a list of 16 articles;
-
I would like the price field to be filled automatically with the corresponding value when an article is selected.
My question is:do I need to create 16 different price fields, or is there a simpler way to link each dropdown option to its price and display it automatically?
Thanks in advance!
Hi amax
You can add a trigger when the first dropdown changes, and on the 2nd dropdown you need to add an advanced listener, which can have any of these:
- Call Function, in your function you can set the value of the Price field to whatever you want.
- AJAX Call, the 2nd parameter to the AJAX can be a function name which will receive the AJAX response, the response can be the price you need, in your AJAX page you can run some PHP or Read Data to get the price and "echo" it
You can also have 16 triggers and 16 listeners, 1 for each article