Opened 14 years ago
Closed 13 years ago
#2666 closed enhancement (fixed)
Form widgets should reset to initial value
Reported by: | Adam Peller | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.1 |
Component: | Dijit | Version: | 0.4.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
For DDDP, hit a form "reset" button and they all go blank, regardless of their initial value. It's likely that most of our form elements have this problem. I'll call this an enhancement. Perhaps we can consider this for dijit.
Change History (7)
comment:1 Changed 14 years ago by
Component: | Widgets → Dijit |
---|---|
Milestone: | → 1.0 |
comment:2 Changed 14 years ago by
Milestone: | 1.0 → 2.0 |
---|
comment:3 Changed 13 years ago by
As suggested in #5318, if this is too hard to do for the general case (since we can't detect when a reset button has been pressed... there's no associated event, apparently), then require the user to use the Form widget to wrap their form, rather than a vanilla <form> node.
comment:4 Changed 13 years ago by
Owner: | changed from bill to Douglas Hays |
---|
Doug and I talked this over at DDD Feb 2008:
Each widget will save it's original value and have a reset() method. reset() method will revert widget to it's initial value in addition to resetting the state to 'untouched' (so mandatory fields aren't yellow even though they are blank).
dijit.Form catches onreset event, cancels it, and then tells underlying widgets to reset().
I guess there wasn't a conclusion about native form elements; will worry about them later.
comment:5 Changed 13 years ago by
Milestone: | 2.0 → 1.1 |
---|
comment:6 Changed 13 years ago by
Priority: | normal → high |
---|
Marking as a beta requirement since patch will (or may) change API to MultiSelect?.
comment:7 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [12482]) Fixes #2666. Add reset() method to form widgets. Changed MultiSelect? get/setValues to get/setValue. Added field reset call to 1 textbox and 1 checkbox example. Added reset automated test to Form.html.
Let's think about it for 1.0, when we implement a form widget.