We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Im not sure im using it wrong or not, I want to dynamically set form model if the request input is defined.
Here is my code:
// Create the form $form = $formBuilder->create(MyForm::class) ->setUrl('...') ->setMethod('POST') ->setFormOptions(['model' => $model]) ->remove('...');
But the $this->getModel() returns empty.
$this->getModel()
Then I change to:
$form = $formBuilder->create(MyForm::class, [ 'url' => '...', 'method' => '...', 'model' => $model, ])->remove('submit.update');
And it works properly.
Am I doing anything wrong?
The text was updated successfully, but these errors were encountered:
you should use setFormOptions(['model' => $model]) instead of setupFieldOptions.
setFormOptions(['model' => $model])
setupFieldOptions
Sorry, something went wrong.
Sorry that was a typo, I meant setFormOptions
No branches or pull requests
Hi,
Im not sure im using it wrong or not, I want to dynamically set form model if the request input is defined.
Here is my code:
But the
$this->getModel()
returns empty.Then I change to:
And it works properly.
Am I doing anything wrong?
The text was updated successfully, but these errors were encountered: