[Vuejs]-How to submit vue-google-maps placeInput to server?

0👍

I’d still like to see your generated html but I think the problem is that there’s no name attribute on the input you’re creating. Thus, it’s not part of the posted data.

<place-input
        :place.sync="placeInput.place"
        :types.sync="placeInput.types"
        :component-restrictions.sync="placeInput.restrictions"
        class='form-control'
        name='location'
        label='Location: '
></place-input>

0👍

I am not familiar with vue but what about sending your form through vue and adding manually adding the location to the ajax request? Something like

<form v-on:submit.prevent="onSubmit">
//Your form
</form> 

and

methods: {
    onSubmit: function (event) {
      //You can ajax your form data + manually add your location-input from your component
    }
  }

Would that solve your problem?

Leave a comment