You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"onChange" triggers when setValue is called on your form elements. It is also triggered when dynamic form elements have been added to the form. The "currentValues" is an object where the key is the name of the input and the value is the current value.
144
+
"onChange" triggers when setValue is called on your form elements. It is also triggered when dynamic form elements have been added to the form. The "currentValues" is an object where the key is the name of the input and the value is the current value. The second argument states if the forms initial values actually has changed.
144
145
145
-
#### <aname="resetform">reset()</a>
146
+
#### <aname="resetform">reset(values)</a>
146
147
```html
147
148
var MyForm = React.createClass({
148
149
resetForm: function () {
@@ -157,15 +158,35 @@ var MyForm = React.createClass({
157
158
}
158
159
});
159
160
```
160
-
Manually reset the form to its pristine state.
161
+
Manually reset the form to its pristine state. You can also pass an object that inserts new values into the inputs. Keys are name of input and value is of course the value.
With the `preventExternalInvalidation` the input will not be invalidated though it has an error.
161
181
162
182
### <aname="formsymixin">Formsy.Mixin</a>
163
183
164
184
#### <aname="name">name</a>
165
185
```html
166
186
<MyInputComponentname="email"/>
187
+
<MyInputComponentname="address.street"/>
167
188
```
168
-
The name is required to register the form input component in the form.
189
+
The name is required to register the form input component in the form. You can also use dot notation. This will result in the "form model" being a nested object. `{email: 'value', address: {street: 'value'}}`.
0 commit comments