V
V
Vladimir2016-09-23 15:19:37
Yii
Vladimir, 2016-09-23 15:19:37

How to pass the desired action to the Yii2 form?

Good day! Created this form:

<?php
echo Html::beginForm([
    'wall' => 'Панель',
    'city' => 'Киев',
]);

?>
<?=Html::dropDownList('wall', 'wall', ['Панель' => 'Панель', 'Кирпич' => 'Кирпич',]) ?>
<?=Html::dropDownList('city', 'city', ['Винница' => 'Винница', 'Киев' => 'Киев',]) ?>
<?=Html::submitButton('Искать!') ?>
<?=Html::endForm() ?>

Please tell me how you can transfer the data that the user selects, and not manually register as I have ('wall' => 'Panel',). I haven't worked with simple forms in Yii2 and I don't know how to organize it.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question