Element: Why is this form submit handler not working?

Created on 6 Dec 2016  ·  3Comments  ·  Source: ElemeFE/element

      ul
        li(v-for='ride in rides')
          h3 {{ride.start}} nach {{ride.end}}
          p {{ride.driver.phoneNumber}}
      el-form(@submit.prevent='addRide' :model='form')
        el-form-item(label='Start')
          el-input(v-model='newRide.start')
        el-form-item(label='Ziel')
          el-input(v-model='newRide.end')
        el-form-item(label='Telefonnummer')
          el-input(v-model='newRide.driver.phoneNumber')
        el-form-item
          el-button(type='primary' @click='addRide') Fahrt anbieten

The form submit event is not firing. What am I doing wrong? There is no example in the docs.

question

Most helpful comment

http://jsfiddle.net/cinwell_li/wkd41qky/

el-form(@submit.prevent.native='addRide')
  el-button(type='primary' native-type='submit') Fahrt anbieten

All 3 comments

el-form(@submit.prevent.native='addRide')

@QingWei-Li no, no effect. nothing happens when I hit enter.

http://jsfiddle.net/cinwell_li/wkd41qky/

el-form(@submit.prevent.native='addRide')
  el-button(type='primary' native-type='submit') Fahrt anbieten
Was this page helpful?
0 / 5 - 0 ratings

Related issues

sudo-suhas picture sudo-suhas  ·  3Comments

fscardua picture fscardua  ·  3Comments

akaylh picture akaylh  ·  3Comments

dbskccc picture dbskccc  ·  3Comments

yubo111 picture yubo111  ·  3Comments