Vue-select: How to name the input for post requests

Created on 24 Oct 2016  路  4Comments  路  Source: sagalbot/vue-select

This is a noobish question, but how can I name an input for post requests, so I can save the input to database?

I want to use this component as a select box

<v-select name="tags"></v-select>

the one above did not work

Most helpful comment

Hi @shigg1120,

The component itself isn't a form input, so you'll need to use a hidden input.

<v-select value.sync="foo">
<input type="hidden" v-model="foo" name="foo" />

All 4 comments

Hi @shigg1120,

The component itself isn't a form input, so you'll need to use a hidden input.

<v-select value.sync="foo">
<input type="hidden" v-model="foo" name="foo" />

appreciate your help

It is not working with version 3.1.0

@mortezarajabi looks to be working in this example https://codepen.io/sagalbot/pen/zZQJKW

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PrimozRome picture PrimozRome  路  4Comments

theseawolves picture theseawolves  路  4Comments

fabianmieller picture fabianmieller  路  3Comments

manjunath-coachthem picture manjunath-coachthem  路  3Comments

threeaccents picture threeaccents  路  3Comments