Form Input Fields in Yii2.0

| Last Updated: | In: Yii framework


This article will explain the better way to use Form Input Fields in Yii2.0. Folder structure of ‘yii\widgets\ActiveForm’ class is used to create a form and ‘yii\helpers\Html’ class is used to display the different type of HTML input fields like buttons, textbox, checkbox, radio buttons, select box etc.

Start nad end the active Form

Imput field Text box

Input field Text Area

HTML5 input fields Email and password

Password input field.

HTML5 input field.

DropDown List Input Field

dropDownList() fuction create the select html tags.

File Upload Input field


About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.


You may also like:


, , ,