0
I need an example in Yii2 that allows me to put some submitButton and textinput() in the same line, as the example below:
part of my code that mounts the buttons :
<?= Html::submitButton(Yii::t('app','Voltar'), ['class' => 'btn btn-primary', 'name' => 'voltar','style' => 'width:78px']) ?>
<?= Html::submitButton(Yii::t('app','Atualizar'), ['class' => 'btn btn-primary', 'name' => 'atualizar','style' => 'width:80px']) ?>
<?= Html::Button(Yii::t('app','Apagar'), ['id'=>'btn-confirm','class' => 'btn btn-danger', 'name' => 'apagar','style' => 'width:78px','disabled'=>$desabilitaAPAGA]) ?>
<?php
if($habilitaLIGA)
echo Html::submitButton(Yii::t('app','Ativar'), ['class' => 'btn btn-success', 'name' => 'ativar','style' => 'width:78px']);
?>
<?php
if($habilitaDESLIGA)
echo Html::submitButton(Yii::t('app','Desativar'), ['class' => 'btn btn-success', 'name' => 'desativar', 'style' => 'width:80px']);
?>
<?= Html::submitButton(Yii::t('app','Gráfico'), ['class' => 'btn btn-primary', 'name' => 'grafico','style' => 'width:80px']) ?>
I’m waiting for an example to help me.
And what your buttons look like?
– Woss
Textinput and write button are on the bottom line, with the insertion of this code below:
– Morse
<div class="input-group"> <?= $form->field($model, raw_data')->textInput(['style'=>'width:100px']);? > <?= Html::submitButton(Yii::t('app','write'), ['class' => 'btn btn-Primary', 'name' => 'write','style' => 'width:80px']) ? > </div>
– Morse