Prevent save to not existing column
I have a dependent select. In this table I don't have product_id, I only save to variant_id. The product is only shown in order to filter the variant. How do I prevent the form to try to save to product field. Filament will always try to save a field to a column.
Column not found: 1054 Unknown column 'product' in 'field list'
6 Replies
Can you try
->dehydrated(false)
read more here https://filamentphp.com/docs/3.x/forms/advanced#preventing-a-field-from-being-dehydratedI still get this error @Vp
I only need the product dropdown to get the variant but I don't save the selected product to the order table.
According to the link it should prevent, If it doesn't work then I don't have any idea, sorry
@Vp order matters. I put the method below live(), it's not working. But moving it above is working.
Thank you
Oh, I also learned new lesson "order matters"