Yii framework provides a helper class called "Html" to generate HTML elements easily. One of the methods available in Yii's Html helper is "input". This method generates an HTML input element with given options.
For example, to generate an HTML text input element, we can use the following code:
'form-control']); ?>
This will generate the following HTML:
We can also generate other types of input elements such as radio buttons, checkboxes, and hidden inputs. Here are a few examples:
'Male']); ?>
'I agree']); ?>
These will generate the following HTML:
The "input" method belongs to the "yii\helpers\Html" package library which is a part of Yii's core framework.
PHP yii\helpers Html::input - 30 examples found. These are the top rated real world PHP examples of yii\helpers\Html::input extracted from open source projects. You can rate examples to help us improve the quality of examples.