[Vuejs]-Vue App ID causing issues with existing page 'addEventListener'

0👍

✅

In “JSON Dayslots”, your v-bind:value is set to item.slot, so vue binds items.slot to search. As a result, {{ search.shortcode }} in your search summary is trying to access item.slot.search, which doesn’t exist. Setting v-bind:value to just “item” should make your code work.

<select v-model="search">
    <option disabled="disabled" value="">JSON Dayslots</option>
       <option v-for="item in items" v-bind:value="item">
          {{ item.shortcode }} {{ item.slot }}
    </option>
 </select>

As for your addEventListener, I’m not sure why it stops working. In your source code, your form name is myform, while the const ‘form’ is bound to ‘submit-to-google-sheet’. Perhaps this is the problem? Although in this question, it seems to be set up correctly.

const form = document.forms['submit-to-google-sheet']

Both are working in this jsfiddle: https://jsfiddle.net/adampiziak/mrdva3kj/10/

(the listener just outputs “submitted” to the console)

Leave a comment