Issue
I´m more or less new in the Yii 2.0 framework and I´ve been having a serious problem with this situation. I want a dropdown list that shows the differents values I already used in the past but that let me write whatever I want. Like this:
this is the code:
$form->field($model, 'order_idorder')->widget(Select2::classname(), [
'data' => ArrayHelper::map(Order::find()->joinWith('compartmentIdCompartment')->joinWith('hybridIdHybr')->orderBy('idorder')->all(),
'idorder', 'fullName'),
'options' => ['placeholder' => Yii::t('app', 'Choose Order')],
'pluginOptions' => [
'allowClear' => true
],
]);`
The problem with this is that I need to choose one of the options in the dropdown. And I want just the information being display, without the need of actually selecting anything.
Solution
After some days searching for the answer, I finally found this:
Demo: http://www.dhtmlgoodies.com/scripts/form_widget_editable_select/form_widget_editable_select.html
Code:
http://www.dhtmlgoodies.com/index.html?whichScript=form_widget_editable_select
Answered By - Matías Joaquín Tucci
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.