By default, the form will have action = ''and method = 'post'. You should change this:
echo Html::beginForm(['method' => 'get', 'action' => 'user/create']);
echo Html::activedropDownList(
$model,
'COMPANY_ID',
$companyList,
['onchange'=>'this.form.submit()']
);
echo Html::endForm();
Further information can be found in the document here .
UPDATE
By the way, you should double-check how you retrieve the identifier on the user / creation page. To check how the get parameter is sent, I would recommend that you do var_dump ($_GET)in this action. IE:
ContacForm, "get", var_dump ($_GET) , :
array (size=3)
'r' => string 'site/contact' (length=12)
'ContactForm' =>
array (size=5)
'name' => string 'c' (length=1)
'email' => string 'teste@teste.com.br' (length=18)
'subject' => string 'safd' (length=4)
'body' => string 'asfas' (length=5)
'verifyCode' => string 'eaxpzwp' (length=7)
'contact-button' => string '' (length=0)
, , "ContactForm". , ContactForm.php. /create . , - :
$get = Yii::$app->request->get();
if (isset($get['ContactForm'])) {
$COMPANY_ID = $get['ContactForm']['COMPANY_ID'];
}
, -, .