How to edit default input value

Hi everyone i have a case where before i show the data i have to change it is there a some function or somethin can be good for me ->afterStateHydrated is not good solution any other is good
5 Replies
Dennis Koch
Dennis Koch5mo ago
When you are using the form builder, just fill the form with the data you want? $this->form->fill(['key' => 'your data'])
mile4841
mile4841OP5mo ago
Thanks but i have a problem that web app has multi languages and i am using tabs to show the data so i can here solve this problem, Reapeter is not solution. I need for en tab to have
protected function mutateFormDataBeforeFill(array $data): array
{
$data['user_id'] = $data['user_en'];

return $data;
}
protected function mutateFormDataBeforeFill(array $data): array
{
$data['user_id'] = $data['user_en'];

return $data;
}
Is this possible
Dennis Koch
Dennis Koch5mo ago
Just set the content you want to set. You didn't share any code and I have no idea about your datastructure
mile4841
mile4841OP5mo ago
Okay i will try with what i have now, i will write if i successed or not
Want results from more Discord servers?
Add your server