Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

muazzamazaz's avatar

Assign value to input field

Using vue3 how to assign value to input field in for loop

 <div v-for="(q, index) in questions">
<BreezeInput
            id="category_id" 
            type="text"
            value={{q.category_id}}
            class="mt-1 block w-full"
            v-model="form.category_id"
          />

</div>

0 likes
2 replies
tykus's avatar

Why is the initial value not coming from v-model? Does your form have initial data?

1 like

Please or to participate in this conversation.