Buy Now
Sign in

Retrieve and use dynamic drop-down value in form

momentis , December 18 2018, 16:48
momentis 430
December 18 2018, 16:48 #382285
I have a form with a dynamic drop-down, populated from a table in my DB (Model 'CUST'). There is a field in the 'CUST' dataset named 'CUST_QUOTA', and I need to set a form field ('PR_BASE') based on the selection a user makes from the drop-down. I am not sure if I need some Javascript to do this, but I am at a loss how to set it up.

GreyHead 64
December 19 2018, 09:25 #382305
Hi momentis,
You need to do this in the browser when the user changes the drop-down? Then it needs to be with JavaScript.
I think that you could use the Events tab in the Drop_down element to do this., but you'd have to use some odd settings and build a function so Custom JavaScript is probably better. A couple of line in a Custom JavaScript action should do it. Basically onChange of dropdown id set the value of PR_BASE.
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
momentis 430
December 19 2018, 13:32 #382310
That makes sense. Thanks!!!!