heilhead / react-bootstrap-validation

Form validation for react-bootstrap
MIT License
136 stars 50 forks source link

How to set initial value of ValidatedInput type text? #63

Open msimonc opened 8 years ago

msimonc commented 8 years ago

For the update case with a value on this.state, how can it be the default value? Thx!

JohnHanna86 commented 7 years ago

+1, i have the same issue, please help

JohnHanna86 commented 7 years ago

i just found out how to do that, it's simply using model parameter in the form <Form onValidSubmit={this.handleValidSubmit.bind(this)} onInvalidSubmit={this.handleInvalidSubmit.bind(this)} model={{ email: this.props.profile.email, nickname: this.props.profile.nickname }}

mikethejet commented 7 years ago

When i am loading page where the values are fetched from databse the model property is set up after that, but the form is not rerendered..so the input fields is not filled with values.. some render force?

mikethejet commented 7 years ago

Is any way how to change model of form to refresh with new values? Help please ..