rsiripong / yii2-ddltextswitcher
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
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
])