yii2-formwizard

yii2 formwizard checkbox field value set to 1 even if not selected

徘徊边缘 提交于 2020-04-16 03:55:08
问题 I am using yii2-formwizard and I want to insert a checkbox as form input field for the field is_legal in a tabular step. So in fieldConfig array, reading the documentation, I inserted the following code: 'is_legal' => [ 'options' => [ 'type' => 'checkbox', 'template' => '{input}{beginLabel}{labelTitle}{endLabel}{error}{hint}', ], 'labelOptions' => ['label' => \Yii::t('app', 'Legal Representative')], ], If I select the checkbox or not the value of the field is always 1 as shown on: . However,

yii2 formwizard checkbox field value set to 1 even if not selected

不想你离开。 提交于 2020-04-16 03:52:03
问题 I am using yii2-formwizard and I want to insert a checkbox as form input field for the field is_legal in a tabular step. So in fieldConfig array, reading the documentation, I inserted the following code: 'is_legal' => [ 'options' => [ 'type' => 'checkbox', 'template' => '{input}{beginLabel}{labelTitle}{endLabel}{error}{hint}', ], 'labelOptions' => ['label' => \Yii::t('app', 'Legal Representative')], ], If I select the checkbox or not the value of the field is always 1 as shown on: . However,

Yii2 Saving tabular data using yii2-formwizard

ぐ巨炮叔叔 提交于 2020-01-05 05:36:06
问题 I am integrating yii2-formwizard for tabular input but unable to submit the data to my controller action and use Model::loadMultiple . I have to declare my model as array and then I need to initialize it before passing to view and in buttflattery/yii2-formwizard front-end I must specify my model as array fine but I can not retrieve data from my controller dynamically. I need to dynamically create instance from front-end and save them in back end. I can save only the instance I have initialize