Just starting out with Vue and could use a hand extracting a value from an input field:
Here's what I have in my form:
<input type="hidden" id="groupId" value="1">
If I were using jQuery, I would do the following:
var group_id = $('#groupId').val();
However, I'm unsure how to bind the hidden field in Vue:
<div id="app">
<input type="text" v-model="groupId"> //Where should I place the value?
</div>
new Vue({
el: '#app',
data: {
groupId: //What should I include here to obtain the field's value?
}
Any tips on how to accomplish this?