dynamic form schema timing issue
I've got a form that should only be loaded when a user clicks on an item in a list (not on page load). To handle this I have
wire:click
in my blade file, which calls my loadRecent
method. This method loads the necessary data that drives which fields will be on my form. The form data is unknown until the user clicks an item, so having a form with a standard set of hidden fields isn't an option.
My issue is that $form->schema($this->getSchema())
seems to be getting called early in the lifecycle before when my data is populated as is evidenced by the logs referenced in the code below.
Solution:Jump to solution
ok, I was able to do this in my loadRecent method, which works.
```php
$this->form->fill($data);
$form = $this->getForm('form');...
1 Reply
Solution
ok, I was able to do this in my loadRecent method, which works.