Partial Form fill?

I have a form that I use in multiple places, at one point i launch it from a CreateAction that is on a custom page lets say, I only want to do a form ->formFill() for two fields. Seems when i try to do that, it removes any default()'s i already have on the form for the other fields. Anyway to avoid that?
2 Replies
Dan Harrin
Dan Harrin2y ago
why not add the initial values in default()
Mark Chaney
Mark ChaneyOP2y ago
I am going to do MyModel::getForm($defaults) and then have getForm($defaults = null) on my schema. Seems to work great and then did ->default($defaults['taskable_id'] ?? null) for example on a field i wanted to fill only a certain times
Want results from more Discord servers?
Add your server