dguedert
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
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