My "issue" is actually ignorance. I have an HTML form and I use Vue.js to fill a v-select
input with PHP data:
<div id="app">
<form>
<v-select name="user2_id" placeholder="Seleccionar Usuario" :options="[{!! $users !!}]" class="select"></v-select>
<select name="user2_type" id="user2_type" class="form-control required">
...
</select>
</form>
</div>
The JS part:
<script src="https://unpkg.com/vue@2.1.10"></script>
<script src="https://unpkg.com/vue-select@2.0.0"></script>
<script>
Vue.component('v-select', VueSelect.VueSelect);
new Vue({
el: '#app'
});
</script>
When I submit the form I only got the user2_type but not the user2_id. I think is because the browser does not recognize v-select
as a form input.
Is there any easy way or should I submit the form with AJAX or something else?
Thank you
Edit: Web Inspector generated HTML output
<div class="dropdown v-select select searchable" name="user2_id">
<div type="button" class="dropdown-toggle clearfix">
<input debounce="0" placeholder="Seleccionar Usuario" class="form-control" style="width: 100%;" type="search">
<i role="presentation" class="open-indicator"></i>
<div class="spinner" style="display: none;">
Loading...
</div>
</div><!---->
</div>