dguedert
dguedert
FFilament
Created by dguedert on 8/8/2023 in #❓┊help
Save only de subcategory and show category and subcategory in the Form
I created a form that have name (TextField), category (Select) and subcategory (Select). I Used afterStateUpdated to fill the subcategory and works fine when I create a new register, but I save only de subcategory id in the database. How can I select the category based on the belongsTo from subcategory when I open an Edit Form? I dont want to save category_id in the register.
4 replies
FFilament
Created by dguedert on 8/2/2023 in #❓┊help
mutateFormDataBeforeSave and mutateFormDataBeforeCreate for all items in hasMany
Hi everyone. How can I change all fields in all related items in a model that has using mutateFormDataBeforeSave and mutateFormDataBeforeCreate? For example: post -> comments I want to change user_id field in all comments
4 replies