rrag rrag - 11 months ago 48
React JSX Question

Reactjs: Form with multiple inputs does not submit

JSBin: https://jsbin.com/qotuxofalo/edit?js,output

(^ uses ES6 class, so please use a latest browser to test)

If I comment out the second

the form submits, but does not submit with more than 1

What am I missing?

Answer Source

You need to add a input of type submit to make the form work. Check the following examples. Adding that will submit the form on pressing enter. If you don't want that submit button, you can hide it using css.