Inputs
Bootstrap Inputs come with few additionals parameters and associated methods.
Thesize
allow you to specify the input size:
Form::input('name', 'value', array('size' => 'large'))
The
search
add a search input styling:
Form::input('name', '', array('search' => true))
You also can call
disabled()
method:
Form::input('name', '')->disabled()
Append and Prepend
prepend()
or append()
methods (or keys) provide surrounding input support.
Form::input('name', '', '@') // only for prepend Form::input('name', '', array('prepend' => '@')) Form::input('name', '')->prepend('@')
@
Use
icon-
keyword to append / prepend an icon:
Form::input('name', '', array('prepend' => 'icon-user'))
Append or prepend
multiple
items:
Form::input('name', 'value')->append('icon-envelope', '@')
@
Append or prepend
button dropdowns
:
$dp = Html::button_dropdown('#', 'test', array('split' => true)); $dp->item('#', 'one'); $dp->item('#', 'two'); Form::input('name', '')->append($dp);
Attach tooltip or popover
inputs supports bothtooltip()
and popover()
attached elements. Popover triggering is on focus
by default:
Form::input('name', '')->popover('Username', 'Fill the username you'll wan't to login');
Extra Input types
Add the
search-query
css class and search
type attribute to the input:
Form::search('name', '', array('placeholder' => 'Search...'))
Add the
uneditable-input
css class to a span
element:
Form::locked('name', 'icon-user')
name