-
Notifications
You must be signed in to change notification settings - Fork 750
Closed
Description
` handleSubmit() {
var title = this.refs.title.getDOMNode().value.trim();
var description = this.refs.description.getDOMNode.value.trim();
this.props.onCommentSubmit({title: title, description: description});
this.refs.title.getDOMNode().value = '';
this.refs.description.getDOMNode().value = '';
return false;
},`
I have a form
<form className="requestForm" onSubmit={this.handleSubmit}> <input className="form-control" type="text" placeholder="Your title" ref="title" /> <input className="form-control" type="text" placeholder="Say something..." ref="description" /> <input className="form-control" type="submit" value="Post" /> </form>
but i keep getting an error that this.refs.title.getDOMNode is not a function
Metadata
Metadata
Assignees
Labels
No labels