rsiripong/yii2-ddltextswitcher

dev-master 2017-02-14 09:41 UTC

This package is not auto-updated.

Last update: 2025-03-10 17:31:40 UTC


README

switch input between dropdownlist and textinput

example

use rsiripong\ddltextswitcher\DdlTextSwitcher;

echo $form->field($model, 'PERSONTITLEID')
    ->widget(DdlTextSwitcher::classname(),[
        
        'items'=> ArrayHelper::map(\app\models\Empersontitle::find()->all(),'PERSONTITLEID','PERSONTITLENAME'),// dropdownselect list
        'prompt'=>$promptMsg ,
        'nameother'=>'PERSONTITLEOTHER' /// other text input
    ])