yii2-multiple-input
yii2-multiple-input copied to clipboard
No input with nested MultipleInput after remove
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
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);
?>