I am controlling my c program using this as a web interface, now I added alarm time in which MySQL will get the alarm time and I will use it in my c as input and another one I need to on-off alarm so that need dropdown box in which on-off can be selected but it should reflect as 0 and 1 in MySQL table, so that I can process the value.
I tried to get input and validate it and change it to 0 and 1, as it is yii2 I cannot do that so.
My form page is:
<?= $form->field($model, 'idalarmsnooze')->textInput() ?>
<?= $form->field($model, 'snoozetime')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'alarmflag')->textInput() ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
I need alarm flag as dropdown with true or false and the true or false should reflect as 0 and 1 in MySQL table