What am doing here is on clicking a link verify if all fields are filled if filled submit form as usual else will show some errors. But how can I continue submiting a form normally after using e.preventdefault in react?
var formComponent = React.createClass({
verifyFields: function (e) {
e.preventDefault();
if (this.state.primaryGuestName && this.state.primaryGuestMobile) {
// how can i continue with form submission here(not using xhr)
} else {
showErrors();
}
},
render: function () {
<form action={this.props.action} ref="booking_form" acceptCharset="UTF-8" method="post">
{form contents}
<a href="" name="submit_details" onClick={this.verifyFields}
className="btn-flat btn-large rd-button">Confirm Details</a>
</form>
}
}