Reset multiple field when boolean update
Hi, I have this Section in my form, where we can manage the Duration of a service.
I have 3 field, one for the base time, one for a second time if needed, and the last one, a toggle to say if the duration is variable, on quotation.
I need the 2 first fields (duration and max_duration) tu be null when I update the duration_quotation, but I can't manage to reset both :/
Thx in advance 🙂
Solution:Jump to solution
```php
->afterStateUpdated(
function ($state, callable $set) {
if ($state) {
$set('duration', null);...
2 Replies
Solution
Haan ok, the syntax with the fn and the arrow just lost me :x Thank you ! 🙂