Skip to content

Commit

Permalink
Merge pull request #7658 from smeng9/formid
Browse files Browse the repository at this point in the history
[Doc] Update <SaveButton/> prop in <Form/> example
  • Loading branch information
djhi committed May 9, 2022
2 parents 2478b75 + a29861d commit 0d6081f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/Form.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const PostCreate = () => (

## `id`

Normally, a submit button only works when placed inside a `<form>` tag. However, you can place a submit button outside of the form if the submit button `form_id` matches the form `id`.
Normally, a submit button only works when placed inside a `<form>` tag. However, you can place a submit button outside of the form if the submit button `form` matches the form `id`.

Set this form `id` via the `id` prop.

Expand All @@ -93,7 +93,7 @@ export const PostCreate = () => (
<NumberInput source="nb_views" />
</Stack>
</Form>
<SaveButton formId="post_create_form" />
<SaveButton form="post_create_form" />
</Create>
);
```
Expand Down
4 changes: 2 additions & 2 deletions docs/SimpleForm.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const PostCreate = () => (

## `id`

Normally, a submit button only works when placed inside a `<form>` tag. However, you can place a submit button outside of the form if the submit button `form_id` matches the form `id`.
Normally, a submit button only works when placed inside a `<form>` tag. However, you can place a submit button outside of the form if the submit button `form` matches the form `id`.

Set this form `id` via the `id` prop.

Expand All @@ -97,7 +97,7 @@ export const PostCreate = () => (
<RichTextInput source="body" />
<NumberInput source="nb_views" />
</SimpleForm>
<SaveButton formId="post_create_form" />
<SaveButton form="post_create_form" />
</Create>
);
```
Expand Down
4 changes: 2 additions & 2 deletions docs/TabbedForm.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const PostCreate = () => (

## `id`

Normally, a submit button only works when placed inside a `<form>` tag. However, you can place a submit button outside of the form if the submit button `form_id` matches the form `id`.
Normally, a submit button only works when placed inside a `<form>` tag. However, you can place a submit button outside of the form if the submit button `form` matches the form `id`.

Set this form `id` via the `id` prop.

Expand All @@ -132,7 +132,7 @@ export const PostCreate = () => (
<TabbedForm toolbar={false} id="post_create_form">
...
</TabbedForm>
<SaveButton formId="post_create_form" />
<SaveButton form="post_create_form" />
</Create>
);
```
Expand Down

0 comments on commit 0d6081f

Please sign in to comment.