-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
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
No input with nested MultipleInput after remove #252
Labels
Comments
Post an example of the code, please. |
<?= $form->field($model, 'nestedObjects')->widget(MultipleInput::class, [
'rendererClass' => \unclead\multipleinput\renderers\ListRenderer::class,
'max' => 6,
'min' => 1,
'allowEmptyList' => false,
'enableGuessTitle' => true,
'addButtonPosition' => MultipleInput::POS_HEADER, // show add button in the header
'enableError' => true,
'columns' => [
[
'name' => 'nested1', // attribute
'title' => Yii::t('object', 'Nested1'),
'type' => MultipleInput::class,
'options' => [
'max' => 12,
'min' => 0,
'allowEmptyList' => true,
'enableGuessTitle' => true,
'addButtonPosition' => MultipleInput::POS_HEADER, // show add button in the header
'enableError' => true,
'columns' => [
[
'name' => 'nested2', // attribute
'title' => Yii::t('object', 'nested2'),
],
],
],
],
],
])
->label(false);
?> |
I was trying this example and combine with Tabular widget. In my case it's works, but need little bit event afterInit and afterAddRow to make custom generate element multidimesional array on second level. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For nested MultipleInput I not have a any data in $_POST for this field in case delete all rows. For 1st level I can see empty string (also is not good, but it exist).
I expect same behavior for 1st and 2st level of MultipleInput
The text was updated successfully, but these errors were encountered: