Cool UI right to your door
A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.
Basic example of usage is this:
$this->widget( 'booster.widgets.TbTypeahead', array( 'name' => 'demo-typeahead', 'datasets' => array( 'source' => array( 'Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Dakota', 'North Carolina', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming' ), ), 'options' => array( 'hint' => true, 'highlight' => true, 'minLength' => 1 ), ) );
Here's all configuration properties which you can set for TbTypeahead widget.
Property | Description |
---|---|
type name = default |
description |
/** @var TbActiveForm $form */ $form = $this->beginWidget( 'booster.widgets.TbActiveForm', array( 'id' => 'horizontalForm', 'type' => 'horizontal', ) ); echo $form->typeAheadGroup( $region, 'name', array( 'widgetOptions' => array( 'options'=>array( 'hint' => true, 'highlight' => true, 'minLength' => 1 ), 'datasets'=>compact('source') ), 'labelOptions' => array( 'label' => 'Chtulhu sleeps in:', ) ) ); $this->endWidget(); unset($form);