Conversation
Post requests are only allowed via xhr.
|
/to @mkhatib |
mkhatib
left a comment
There was a problem hiding this comment.
Thanks for fixing this, one change
extensions/amp-form/amp-form.md
Outdated
| ```html | ||
| <form method="post" action="https://example.com/subscribe" target="_blank"> | ||
| <form method="post" | ||
| action="https://example.com/subscribe" |
There was a problem hiding this comment.
Please drop action from here - we don't allow action on post anymore.
|
Didn't realise action only works with GET. Updated the docs to reflect this as well. |
|
|
||
| Example: | ||
| ```html | ||
| <form method="post" action="https://example.com/subscribe" target="_blank"> |
There was a problem hiding this comment.
Unfortunately we still require target for all. Feel free to file a bug to remove that requirement from POST requests but please keep it in the examples for now.
| <input type="submit" value="Subscribe"> | ||
| </fieldset> | ||
| <div submit-success> | ||
| Subscription successful! |
There was a problem hiding this comment.
This would probably error, you'd need to encapsulate the text with a template element.
|
|
||
| **target** | ||
| __required__ | ||
| __required__ for `GET` requests. |
There was a problem hiding this comment.
ditto: this is required for both get and post. Might not make sense for POST anymore feel free to file an issue so we can update the validator rules.
There was a problem hiding this comment.
|
Approved with couple more changes. |
|
@sebastianbenz did you manage to update this PR yet? |
|
@sebastianbenz note that I sent a PR that touches on same path here: #5671 |
|
Closing this for #5986 - thanks @sebastianbenz |
Post requests are only allowed via xhr.