Select field issues with combination of Live + Disabled.
So i have been playing around whole night to get this to work but im simply not able to.
What i want to do is pretty simple though;
1. I want to have the "Location" (UBN) select field to be disabled.
2. User selects a "Contact" (Relatie) in the first select field.
3. When a "Contact" is selected i want to search for all related "Location" objects for that contact and place them in field 2 as options.
3. When options are loaded or when User selected the "Contact" in field #1 i want to enable field #2.
4. User selects "Location" (UBN)
Above simply does not load any options for field #2 (UBN) but this is mainly because the
->disabled(empty($this->data['relation']))
cause removing this let's both fields work as expected. But you can imagine that having the second field disabled when there is no option selected in the first field would be more user friendly.
Am i doing something wrong or is this simply not possible?7 Replies
This does work as expected with the Radio field 🤷♂️.
Have you tried to have a callable for the disabled method?
Not working for me. I tried several cases too. My code:
Yea same, great idea but still didn't work :(.
Someone figured it out?
Using the radio field worked, select didn't
Think its a bug tbh
Yes it is an unsolved bug. We can’t disable choices.js after it was initiated