Reputation: 6639
Am adding properties to the active form but it isn't working
Am using a wbranca's dynamic form that needs to pass a form id in the begin form and also in the same form there is a file uploader that requires'options' => ['enctype' => 'multipart/form-data'
I have tried
<?php $form = ActiveForm::begin(['id' => 'dynamic-form']
,['options' => ['enctype' => 'multipart/form-data']]); ?>
the form cant upload
When I interchange the two like below the form id is not rendered so the dynamic forms can't work
<?php $form = ActiveForm::begin['options' => ['enctype' => 'multipart/form-data'],
,(['id' => 'dynamic-form']]); ?>
Upvotes: 0
Views: 686
Reputation: 10548
In your code ;
<?php $form = ActiveForm::begin['options' => ['enctype' => 'multipart/form-data'],,(['id' => 'dynamic-form']]); ?>
'('
after ActiveForm::begin.form-data'],,(['id'
'()'
in 'id' part. And, didn't closed properly.Use this. It will work
<?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data'],'id' => 'dynamic-form']); ?>
Upvotes: 3