is it possible to open in a new window when i click submit button. I have TWO SUBMIT buttons in my active form.
I know if i give ‘target’=>’_blank’ i will get the desired result in normal cases but it didn’t work in active form.
<?php $form = ActiveForm::begin(); ?>
<div class="form-group">
<div class="col-md-6">
<?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Submit') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<div class="col-md-6">
<?= Html::submitButton('Pdf', ['class' => 'btn btn-primary','name'=>'Pdf'],['target'=>'_blank']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
I tried as above. then i decided to give target => _blank to active form as shown below
<?php $form = ActiveForm::begin(
['options'=>['target'=>'_blank']]); ?>
it works but not the desired way. Now if i click both buttons i will be redirected to new page. I only want to get redirected to new page when i click on button ‘Pdf’.
Any Ideas?
I don’t want any javascript to be used.