Open fidels80 opened 4 years ago
hi i have a problem with the Jui AutoComplete in the first row of the dynamic form the widget is loaded in the second after i click on add it has been trasformed into text field
here the code
field($m, "[{$i}]itcode")-> //textInput(['maxlength' => true,'placeholder'=>'codice']) widget(\yii\jui\AutoComplete::classname(), [ 'clientOptions' => [ 'source' => $datam[$i], 'autoFill'=>true, // 'id'=>"[{$i}]itcode", 'select' => new JsExpression("function( event, ui ) { $('#invoice-[{$i}]itcode').val(ui.item.id); document.getElementById('invoiceitem-{$i}-item').value=ui.item.label; }") ], ] )->label(false) ?> first row input type="text" id="invoiceitem-0-itcode" name="InvoiceItem[0][itcode]" class="ui-autocomplete-input" autocomplete="off" aria-invalid="false"
second row input type="text" id="invoiceitem-1-itcode" name="InvoiceItem[1][itcode]" aria-invalid="false"
it lost the class any ideas?
hi i have a problem with the Jui AutoComplete in the first row of the dynamic form the widget is loaded in the second after i click on add it has been trasformed into text field
here the code
field($m, "[{$i}]itcode")-> //textInput(['maxlength' => true,'placeholder'=>'codice']) widget(\yii\jui\AutoComplete::classname(), [ 'clientOptions' => [ 'source' => $datam[$i], 'autoFill'=>true, // 'id'=>"[{$i}]itcode", 'select' => new JsExpression("function( event, ui ) { $('#invoice-[{$i}]itcode').val(ui.item.id); document.getElementById('invoiceitem-{$i}-item').value=ui.item.label; }") ], ] )->label(false) ?> first row input type="text" id="invoiceitem-0-itcode" name="InvoiceItem[0][itcode]" class="ui-autocomplete-input" autocomplete="off" aria-invalid="false"
second row input type="text" id="invoiceitem-1-itcode" name="InvoiceItem[1][itcode]" aria-invalid="false"
it lost the class any ideas?