dependent() Firing non stop.
dependent() Firing non stop.
bobhassanster
Posts: 16Questions: 5Answers: 1
in Editor
Link to test case: https://docs.ensaf.ac.ma/test/
Error messages shown: No error
Description of problem: Dependent working fine but keep going non stop on add or edit.
Thank you for the support.
This question has an accepted answers - jump to answer
Answers
Hi,
Thanks for the test case!
You have:
But the script is returning:
So it is updating the options of
user.country
based on the selection ofuser.country
. That triggers achange
event each time, thus the infinite loop.I doubt you want to change the list of countries based on the selection of the country!
You probably want to use
dependent()
on the continent field, and have that update the list of countries.Allan
Thank you Allan for your response yes exactly but i don’t know why in my head was thinking country is depending on continent so i put country but in the php script i already was filtering on the continent.