soand
require conditionally
I'm creating an action on a table opening a modal where i want some extra data before i "close" the record. so i have 2 buttons in the modal, one to just save, so it can still be editted, and one to save and close the record. after closing the extra data can't be edited anymore. So i want the "answer" field to be required only when i have the "close" argument in the action. Is there any way to do this?
2 replies
Simple modal resource extra actions
I have create a "simple" resource which opens in a modal following this:
https://filamentphp.com/docs/3.x/panels/resources/getting-started#simple-modal-resources
Is there any way to add an extra action in the footer of the form in the modal? On a normal resource i can use the
getFormActions
on the EditRecord. But on a simple resource i only seem to have a ManageRecords5 replies
Form section that saves to a json column
Hi! I'm trying to make a form with a section that has different details based on a type, kind of a form within a form. Is there any way to wrap fields within it to make it available as a json object I can save to a column?
My example is different integrations, so an integration record has a name and logo, and then a type like "facebook" or "google ads". When choosing a type I set a set of fields for that platform as the credentials is different.
I'm not going to query on the credentials at any point so it seems better to just save it in a json column rather than having unique table for each type and using relations.
Is there any way in filament to wrap a Section or Grid or something so all fields within the section to be saved as json instead of just adding the fields to the $data array?
7 replies