Selectize with additional ontions
Selectize with additional ontions
Hello! Thank you for quick and quality answers to all my questions!
There was one more question: there are 2 tables, for example, "users" and "users_addresses", one to many. In some form, I have an Editor with 2 selectize fields.
If I use selectize in the "user_address" field, I get all the values of the "users_addresses" table in the dropdown. Can I add an additional option to the query (for example, "user_id") to dropdown the list from current row field? Can I clear the "user_address" field when "user" is changed? Thanks!
Answers
I think you'd really need to ask in the Selectize support channels for that one. I'm not sure how you are currently generating the options for example, but I assume that you could need to add the condition to whatever script you are using for that.
Yes - use the
dependent()
to run a function when a field's value is changed - you could have it set the address input to empty for example. Another option is to usefield().input()
and attach your own event listener.Allan
Thanks!