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
Can I somehow add field in group? For example
$this->addGroup('my_group1', ['label' => 'My group'], function(){ $this->add('text1', 'text'); }) $this->addGroup('my_group2', ['label' => 'My group2'], function(){ $this->add('text2', 'text'); })
and render it
form_group('my_group1'); form_group('my_group2');
Now I try to do it with form type
$this->add('group', 'form', ['class'=>Myform::class])
But I'm facing with big problem, all names become name="form_name[field_name]". And no way to make simple name="field_name"
name="form_name[field_name]"
name="field_name"
And another question, how can I add field after field in nested form?
$this->add('form_field', 'form', ['class'=>Myform::class]) $this->addAfter(''form_field.title', 'subtitle', 'text);
The text was updated successfully, but these errors were encountered:
What does addGroup() do?
addGroup()
You can compose forms with the compose() method on the Form class, which will append fields from one form to another. http://kristijanhusak.github.io/laravel-form-builder/form/methods-and-properties.html#compose
compose()
Sorry, something went wrong.
@kristijanhusak it must work like form type, but without nested names. For example
$this->addGroup('my_group1', ['label' => 'My group'], function(){ $this->add('text1', 'text'); $this->add('text2', 'text'); }) form_group('my_group1');
will give
<input name="text1" /> <input name="text2" />
This allows display the form fields more flexibly.
No branches or pull requests
Can I somehow add field in group? For example
and render it
Now I try to do it with form type
But I'm facing with big problem, all names become
name="form_name[field_name]"
. And no way to make simplename="field_name"
And another question, how can I add field after field in nested form?
The text was updated successfully, but these errors were encountered: