0

Hi everybody,
How to add option target=>_blank in my code.

<?= Html::submitButton($model->isNewRecord ?    ' <i class="fa fa-save"></i>   Save & Print' : ' <i class="fa fa-save"></i>   Save & Print', ['target'=>'_blank'] , ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> 
1
Contributor
1
Reply
19
Views
2 Months
Discussion Span
Last Post by sanus
0

Sorted out by myself .

I added target => _blank to active form as shown below

<?php $form = ActiveForm::begin(['id' => 'invform' , 'options'=>['target'=>'_blank']]); ?>

Then changed the code to

<?= Html::submitButton($model->isNewRecord ?   '    Save & Print' : ' <i class="fa fa-save"></i>   Save & Print', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary' , 'target'=>'_blank']) ?>
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.