Browse Source

Add note on how to submit a form (#6594)

main
Simen Bekkhus 9 years ago
committed by Jim
parent
commit
29124cc06f
  1. 5
      docs/07-forms.md

5
docs/07-forms.md

@ -166,3 +166,8 @@ To make an uncontrolled component, `defaultValue` is used instead.
> Note:
>
> You can pass an array into the `value` attribute, allowing you to select multiple options in a `select` tag: `<select multiple={true} value={['B', 'C']}>`.
### Imperative operations
If you need to imperatively perform an operation, you have to obtain a [reference to the DOM node](/react/docs/more-about-refs.html#the-ref-callback-attribute).
For instance, if you want to imperatively submit a form, one approach would be to attach a `ref` to the `form` element and manually call `form.submit()`.

Loading…
Cancel
Save