Can I simulate select field chaining?

Can I simulate select field chaining?

mkleinoskymkleinosky Posts: 46Questions: 6Answers: 5

I used http://www.appelsiini.net/projects/chained on a site
which just makes 2nd (3rd, ...) select input filed values filtered based on previous filed selected values...
e.g. {country] [State] [city]
when country is selected, has a value, state shows only states in that country
etc.

Is this possible with something like
on Init edit
1. fetch the value of country and set the values of [state]
2. if country changes, change the available [state] list ....
?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Hi,

    Sounds like a perfect use case for the dependent() method which was designed for exactly these sort of dependent fields.

    Allan

  • mkleinoskymkleinosky Posts: 46Questions: 6Answers: 5

    thanks, will try it.

This discussion has been closed.