4 Replies
Can you give an example? Once the form is submitted all the form fields will have the updated values of the model.
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
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?
Select is Enum.