Dont Reset Field

How do I prevent any field from resetting after the form is submitted?
4 Replies
awcodes
awcodes8mo ago
Can you give an example? Once the form is submitted all the form fields will have the updated values of the model.
Fatih Durmaz
Fatih DurmazOP8mo ago
return $form ->schema([ Section::make() ->schema([ Textarea::make('subject_name') ->label('Konu Adı') ->autosize() ->unique(ignoreRecord: true) ->required(), Select::make('subject_type') ->options(SubjectType::class) ->prefixIcon('heroicon-o-arrows-up-down') ->label('Konu Türü') ->required(), Toggle::make('status') ->label('Durum') ->default(true) ->onColor('success') ->offColor('danger') ]) ->columns(1) ]); I want to select filed dont reset after form submit
Jean Roumeau
Jean Roumeau8mo ago
If you have enabled create and another, then the field will reset. If don't, the field will maintain for default redirect. If the field is not mapped to any model value then it will display default value. Any reason not to use ->relationship() on Select element?
Fatih Durmaz
Fatih DurmazOP8mo ago
Select is Enum.

Did you find this page helpful?