Skip to content

Commit 793c00e

Browse files
docs: clarify use:enhance compatibility with method="POST" (#12546)
* Update 30-form-actions.md * Update documentation/docs/20-core-concepts/30-form-actions.md --------- Co-authored-by: Tee Ming <[email protected]>
1 parent 7d96cb7 commit 793c00e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

documentation/docs/20-core-concepts/30-form-actions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ The easiest way to progressively enhance a form is to add the `use:enhance` acti
329329
+<form method="POST" use:enhance>
330330
```
331331

332+
> `use:enhance` can only be used with forms that have `method="POST"`. It will not work with `method="GET"`, which is the default for forms without a specified method. Attempting to use `use:enhance` on forms without `method="POST"` will result in an error.
333+
332334
> Yes, it's a little confusing that the `enhance` action and `<form action>` are both called 'action'. These docs are action-packed. Sorry.
333335
334336
Without an argument, `use:enhance` will emulate the browser-native behaviour, just without the full-page reloads. It will:

0 commit comments

Comments
 (0)