Best practice of multiple text field reloads based on dropdown value

Elita- 14 Oct, 2019
Hello, CF6 guru!
I've got the following question - what would be the BEST PRACTICE to create a form where multiple text fields are filled in from DB based on ONE DROPDOWN WALUE?

For ONE text field I have done following:
1. Create an Event in dropdown =
on  Change>reload>text_field;
2. Create text_field with
 Reload event > load_text_field;
3. Create load_text_field page with
1) read data
2) PHP value fill in script
3) custom code {view:text_field}

The QUESTION IS -
should I do all of actions written above for EACH field SEPARATELY, or ....
somehow join everything for all the fields?

WHAT IS THE BEST PRACTICE? what is working, what is not?

Thanks!
Elita
GreyHead 14 Oct, 2019
1 Likes
Hi Elita,

I would probably look at making this a multi-page form with the selector on one page and the data found and filled after the first page submits and the second one loads.

Bob
healyhatman 14 Oct, 2019
1 Likes
If you absolutely must reload multiple fields, put them all in a Container Area and reload the container instead of the individual fields.
Elita- 14 Oct, 2019
Great, healyhatman, works like charm!
Elita- 14 Oct, 2019
Thanks, Bob, that was my second choice, however i like healyhatman's solution. The question is - why you both are skeptical about the dynamic reload? Can it cause any problems?
This topic is locked and no more replies can be posted.