Reset only one form field into it's default state
Hi! I need to manually reset state of one form input.
More specifically inside afterStateUpdated, I want to reset input named "type".
Anyone knows how to achieve this?
I tried $this->reset('data.type') with no luck, and $this->form->fill() reset's everything..
5 Replies
I need to reset the value, meaning I need it to run the ->default method
not just $set
@charlie
I found this, but it's definitely not the right solution
Should work:
What about this?
I feel like getOldFormState is not as obvious on firs tsight
You are correct, old will likely be initiated state on boot