0

My code is like this :

<div id="demo">
  <div>
    <select class="form-control" v-model="selected" required>
      <option v-for="option in options" v-bind:value="option.id">{{ option.name }}</option>
    </select>
    {{selected}}
  </div>
</div>

<input type="text" :name="elementName" v-model="{{selected}}">

See full code here : https://fiddle.jshell.net/stvct9er/1/

After select on combo box, I want to display value of select option on the input text

I try like above code. But it does not work

Please, help me to solve my problem

1 Answer 1

2

You need to move the input inside the demo div because this is the mounted point ,

and with v-model just use quotes <input type="text" v-model="selected">

https://fiddle.jshell.net/stvct9er/2/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.