how to: add data to CreateAction that is not on the model

Hi, I was wondering if there is a clean way to use a CreateAction on a table with a model but also have a piece of data that is unrelated to the model to be used to control some logic on the form. So what I would like to do is add a checkbox 'import configuration' and when that is checked I will use that to conditionally show a select from where to import some configuration. However, this 'import configuration' is not something that exists on my model, so when I save the form it will throw an error (as expected). What is the cleanest way to do this? Cheers, Jonne
Solution:
Add ->dehydrated(false) to the checkbox. That will keep it from being submitted as form data but allow it to be used in the form.
Jump to solution
2 Replies
Solution
awcodes
awcodes11mo ago
Add ->dehydrated(false) to the checkbox. That will keep it from being submitted as form data but allow it to be used in the form.
jonneroelofs
jonneroelofsOP11mo ago
Thanks! Works.
Want results from more Discord servers?
Add your server