amp-form auto submit: option/action to reset form/inputs
See original GitHub issueGiven a form which auto-submits a text input:
<form id="todo"
method="POST"
action-xhr="/advanced/todo/add"
target="_blank"
on="submit-success:todos">
<input type="text" name="todo" on="change:todo.submit">
</form>
It’d be great if there’d be a way to clear the input field on successful form submit.
Please also see comments in https://github.com/ampproject/amphtml/issues/7688 regarding possible approaches for this issue.
Issue Analytics
- State:
- Created 7 years ago
- Comments:43 (31 by maintainers)
Top Results From Across the Web
Reset Fields on AMP Form Submission - Stack Overflow
You can use the clear action to reset all fields in a form: <form id=myForm> <input> </form> <button on="tap:myForm.clear">Clear ...
Read more >amp-form auto submit: option/action to reset form/inputs
Given a form which auto-submits a text input: <form id="todo" method="POST" action-xhr="/advanced/todo/add" target="_blank" ...
Read more >Documentation: <amp-form> - amp.dev
Allows you to create forms to submit input fields in an AMP document.
Read more >Remix Single: Clearing Inputs After Form Submissions
After a form submission completes, you often want to clear out the form fields. You can `useTransition` to know when to reset the...
Read more >Инструкция Honeywell UDC3500 (en) - honeyvell.energy
Table 4-19 Digital Input Option Action on Contact Closure ... Dual 2 Amp Relays (Form A) (Heat/Cool, Pos Prop, TPSC, Relays 1 &...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ankur0890 and @namtenten — I don’t think anything has been built in the meantime to solve this, but I’d be curious to hear about your use cases to make sure it’s factored into whatever approach is used here. Thanks!
/cc @cvializ for visibility
@dev-drprasad @aghassemi @cvializ Thanks for the reply, cvializ.