文本框
:textInput();
密碼框
:passwordInput();
單選框
:radio(),radioList();
復選框
:checkbox(),checkboxList();
下拉框
:dropDownList();
隱藏域
:hiddenInput();
文本域
:textarea(['rows'=>3]);
文件上傳
:fileInput();
提交按鈕
:submitButton();
重置按鈕
:resetButtun();
$form = ActiveForm::begin([
'action' => ['test/getpost'],'method'=>'post',]);
$arr = ArrayHelper::map(Community::find()->all(),
'id', 'name');
$arr = array_merge([
'請選擇小區'], $arr);
echo $form->field($user, 'communityid')->dropDownList($arr);
// 下拉框讀取數據庫操作
