-
Notifications
You must be signed in to change notification settings - Fork 4.1k
amp-form: Submit Form on Input Change #4272
Copy link
Copy link
Closed
Description
Currently forms require a separate submit button, would be great if it'd be possible to omit the submit button if the form contains a single checkbox. Each click on the checkbox would then trigger an XHR request.
This would enable implementing favorite/bookmark actions directly in AMPs with amp-form.
Example:
<form method="post" action-xhr="https://example.com/bookmark/12345" action="https://example.com/bookmark/12345" target="_top">
<input type="checkbox" id="favorite" checked>
</form>
//cc @mkhatib
Reactions are currently unavailable