Copy link to clipboard
Copied
Hi, I would like a dropdown list be on a certain item based on a number on another field.
So basically if I write a number on the field at the bottom that is higher than 10000, I want the upper field to show the option "Más de 10000". And if the user changes the selection on the upper field to any other option (except "Más de 10000"), remove whatever number it is on the bottom field.
Many thanks!
OK. Then as the validation script of the text field enter this code:
if (Number(event.value)>10000) this.getField("ServiciosPlus-Tarjetasincluidas").value = "Más de 10000";
And as the custom validation script of the drop-down field enter this:
if (event.value!="Más de 10000") this.getField("ServiciosPlus-Tarjetasincluidas10000").value = "";
Copy link to clipboard
Copied
What are the names of the two fields?
Copy link to clipboard
Copied
Upper field: ServiciosPlus-Tarjetasincluidas
Lower field: ServiciosPlus-Tarjetasincluidas10000
thanks!
Copy link to clipboard
Copied
OK. What about if they enter a number smaller than 10K in the text field, though (or clear it entirely)? Should it change the value of the drop-down, or leave it the same?
Copy link to clipboard
Copied
If smaller, leave it the same.... thanks!
Copy link to clipboard
Copied
OK. Then as the validation script of the text field enter this code:
if (Number(event.value)>10000) this.getField("ServiciosPlus-Tarjetasincluidas").value = "Más de 10000";
And as the custom validation script of the drop-down field enter this:
if (event.value!="Más de 10000") this.getField("ServiciosPlus-Tarjetasincluidas10000").value = "";
Copy link to clipboard
Copied
Thanks again! 🙂