checkbox name not changeable

Hi guys,

a simple question,but yii-api didn’t help me solving following problem:

I created a checkbox showing aggregate functions of database records. It works pretty fine, but name of checkbox only should be defined by label. Output is property of checkbox and label. How to fix this?




$form = ActiveForm::begin();

?>

<?= $form->field($searchModel, 'choice_aggregate')->checkbox(['itemOptions' => ['class' => 'choiceCheckBox']])->label('Active/Inactive_Aggregate') ?>

<div class="form-group">

    <?= Html::submitButton('Aggregate_function', ['class' => 'btn btn-primary']) ?>

</div>

ActiveForm::end();

$session = Yii::$app->session;

$session->open();

$format_0 = number_format($query_1, 0, '', '.');

$format_1 = number_format($query_4, 0, '', '.');

$format_2 = number_format($query_2, 2, ',', '.');

$format_3 = number_format($query_3, 2, ',', '.');


if ($session['choice_aggreagte'] == true) {

.

.

.

}