user3124979
user3124979

Reputation: 172

Dynamic select values in form

I have form for searching through products that encapsulates three selects: material, weight, and color. These selects contain values from database.

I would like to have a following behavior:

Before I started with nette, I had been doing this using ajax and jquery/javascript by dynamically changing select elements, after user selected value in other select.

I believe in nette should be some good (system) solution, how to reload select's values in a corresponding presenter. Can you help me please?

Upvotes: 1

Views: 1436

Answers (1)

Michal
Michal

Reputation: 2039

Just look into the documentation of nette. In my opinion, this is what you are searching for: http://pla.nette.org/en/dependent-form-select-with-ajax

You can write handles for select changes, and in those handles load to form remaining selects. No messy work with javascript.

Upvotes: 2

Related Questions