Submitting form from Section header action
I'm trying to add some additional fields to a form, but it doesn't seem to be submitting. I have this in the action but $record seems to be null like it's not running mount:
3 Replies
$record will be null on create. If you want to submit the form on both create and edit use $context
@Ron I ended up getting it working by redefining the record since it's always the same, not sure if this is the right approach?
@lmtc this looks like a reasonable approach. I am not sure exactly what is happening with the config value array , but if you want all the config value key/value pairs to be editable , you can fill the form with existing data https://filamentphp.com/docs/3.x/actions/modals#filling-the-form-with-existing-data and then use a simpler Config::updateOrCreate() if 'config_type" is unique for the Config model