Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 708 Bytes

url.md

File metadata and controls

31 lines (23 loc) · 708 Bytes

Url Field

Represents <input> element of type "url" that lets the user enter and edit an URL. Documentation:

Usage Example

Widget:

use Yiisoft\Form\Field\Url;

echo Url::widget()
    ->name('UrlForm[site]')
    ->value('')
    ->label('Your site')
    ->hint('Enter your site URL.')
    ->inputId('urlform-site');

Result will be:

<div>
    <label for="urlform-site">Your site</label>
    <input type="url" id="urlform-site" name="UrlForm[site]" value>
    <div>Enter your site URL.</div>
</div>