Fill form data via emitted action
Is it possible to fill form data via an emitted action?
I do have an action:
which should do the following:
but it seems like the form always get submitted instead of filling in the data in the corresponding fields.
5 Replies
Filling via emitting seems to work only if I fill the form initially (when mounting) with the expected (empty) fields.
why would you emit
you can do that within the action() function
I want to fill in a chosen repeater item via modal (in which i have a table listing all available models)
each repeater item has a button which opens the modal for model selection
and after hitting "apply" in the modal the selected model is passed to the form and should fill the specific repeater item
it is done via 2 components: form component and modal component
due to the documentation it seems like
$this->form->getState();
validates all the fields (which are empty of course). is there another way to get the form data without validation (at this point)?
$formData = $this->form->getRawState();
did it π