0
Ich bin ein Formular mit yii2 machen, ich habe jetzt zwei Bereiche:Nehmen Sie Daten von einem anderen Feld in yii2 Form
<?php echo $form->field($model, 'Protocol')->textInput(['maxlength' => true])->dropDownList(
array("rtsp://"=>"rtsp","rsmt://"=>"rsmt","http://"=>"http"), // Flat array ('id'=>'label')
['prompt'=>'Select'] // options
); ?>
<?php echo $form->field($model, 'url')->textInput(['maxlength' => true]); ?>
Wie kann ich die Auswahl aus Protokoll-Dropdown-Liste und fügt sie automatisch zum folgenden URL-Feld hinzu? Wie folgt: Ich tippe die http://
in das Feld manuell, gibt es trotzdem kann ich es automatisch machen?
Es hat funktioniert, vielen Dank. – ProudNoob
Kann ich diesen Code für das normale Textfeld verwenden? TextInput (['maxlength' => true]) '? – ProudNoob
@ProudNoob. Ja, Sie können nur ID oder Name von TextInput(). –