F
FilamentEqualizer

Dont Reset Field

How do I prevent any field from resetting after the form is submitted?
awcodes
awcodes15d ago
Can you give an example? Once the form is submitted all the form fields will have the updated values of the model.
Equalizer
Equalizer14d 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 Roumeau14d 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?
Equalizer
Equalizer14d ago
Select is Enum.
Want results from more Discord servers?
Add your server
More Posts
How do I programatically log into filament?My Filament has resource pages for admins and non-admins. - I have a user resource and a table-actioImporting a module script failed.Hello everyone, I have the following problem, it breaks the JS script completely because of this, thRelationship Manager: Open in same window (non-modal)Say I have a `UserResource` and a `PostResource`. When I add a `PostRelationManager`, it opens postOpen url in modal actionHello, I am trying to open an url with parameters in a table modal. I want to open a modal, ask theHow to change color palette dynamicallyMy application is multitenant and I would like to change the color palettes according to the client,Custom ValidationMessages for minDate/maxDateI have tried the following, but the html5 validation still shows the default browser error. Do i neeModal actionHow can I do this in a modal window, since there is no ->columns() optionRepeater and auto-increment fieldI have a form with a repeater and I have a field for the number of the element. I want that field tBuild not picking up my Theme CSSI've added this plugin https://filamentphp.com/plugins/mokhosh-kanban and I'm updating the card viewMarkdownEditor not recognising inputI have a Form with a Markdown Editor, it is a required field. When I enter some text and try to savCustom Save Button for Create/Edit with Disable on FileUploadHello Filament Friends, I have a problem with implementing different Save Buttons. My process shoulImage Gallery On Modal like ImageColumnI have to make an image selector to which I pass a collection like this ImageProduct::all() where