title: How to submit a form using vue.js 2?
body: <p>My view blade laravel like this :</p>
  
  <pre><code>&lt;form slot="search" class="navbar-search" action="{{url('search')}}"&gt;
      &lt;search-header-view&gt;&lt;/search-header-view&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The view blade laravel call vue component (search-header-view component)</p>
  
  <p>My vue component(search-header-view component) like this : </p>
  
  <pre><code>&lt;template&gt;
      &lt;div class="form-group"&gt;
          &lt;div class="input-group"&gt;
              &lt;input type="text" class="form-control" placeholder="Search" name="q" autofocus v-model="keyword"&gt;
              &lt;span class="input-group-btn"&gt;
                  &lt;button class="btn btn-default" type="submit" id="submit-search"&gt;&lt;span class="fa fa-search"&gt;&lt;/span&gt;&lt;/button&gt;
              &lt;/span&gt;
              &lt;ul v-if="!selected &amp;&amp; keyword"&gt;
                  &lt;li v-for="state in filteredStates" @click="select(state.name)"&gt;{{ state.name }}&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  &lt;script&gt;
      export default {
          name: 'SearchHeaderView',
          data() {
              return {
                  baseUrl: window.Laravel.baseUrl,
                  keyword: null,
                  selected: null,
                  filteredStates: []
              }
          },
          watch: {
              keyword(value) {
                  this.$store.dispatch('getProducts', { q: value })
                  .then(res =&gt; {
                      this.filteredStates = res.data;        
                  })
              }
          },
          methods: {
              select: function(state) {
                  this.keyword = state
                  this.selected = state
                  document.getElementById('submit-search').submit()
              },
              input: function() {
                  this.selected = null
              }
          },    
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>I want to submit the form when user click the keyword</p>
  
  <p>I try document.getElementById('submit-search').submit()</p>
  
  <p>But on the console exist error like this :</p>
  
  <blockquote>
    <p>TypeError: document.getElementById(...).submit is not a function</p>
  </blockquote>
  
  <p>How can I solve this error?</p>