[Vuejs]-How populate a input hidden with vuejs 2?

6👍

If you expect currentDate to be the value of your hidden field, you should bind it like so:

<input type="hidden" name="customfield" class="form-control" :value="currentDate">

v-model is a two-way binding, and hidden inputs are not interactive, so there is no point in using it.

👤Roy J

Leave a comment