Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 818 Bytes

text.md

File metadata and controls

32 lines (24 loc) · 818 Bytes

Text Field

Represents <input> element of type "text" which is a basic single-line text field. Documentation:

Usage Example

Widget:

use Yiisoft\Form\Field\Text;

echo Text::widget()
    ->name('TextForm[name]')
    ->value('')
    ->label('Name')
    ->hint('Input your full name.')
    ->placeholder('Type your name here')
    ->inputId('textform-name');

Result will be:

<div>
    <label for="textform-name">Name</label>
    <input type="text" id="textform-name" name="TextForm[name]" value placeholder="Type your name here">
    <div>Input your full name.</div>
</div>