Opened 12 years ago

Closed 12 years ago

#3835 closed defect (fixed)

Form widget

Reported by: bill Owned by: joose
Priority: high Milestone: 0.9
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

Implement Form widget for serialization/deserialization of form contents, and for validation. (It should only allow the form to be submitted when all of the widgets that have validation report no problems.)

Change History (14)

comment:1 Changed 12 years ago by bill

(In [9752]) Beginnings of Form widget (ported from 0.4), to serialize form data and to do validation (ie, preventing the form from being submitted with invalid values).

This doesn't have any validation yet (eventually it will disable the submit button when the form has errors) but serialization is working for widgets (although not for plain form elements), so it can be used by TooltipDialog? etc.

Refs #3835.

comment:2 Changed 12 years ago by Adam Peller

(In [9762]) Update DateTextbox? references for 0.9. Refs #3835

comment:3 Changed 12 years ago by bill

(In [9765]) Make dijit.form.Button type="submit" button work for dijit.form.Form and also for plain <form>. Refs #3835

comment:4 Changed 12 years ago by bill

(In [9766]) Only create arrays where necessary (ie, for Checkboxes). Joose tells me that normal fields inside arrays will likely have [] in their name, like employee[3].name.first, so we'll deal with that another day. Refs #3835.

comment:5 Changed 12 years ago by bill

(In [9767]) Submit wasn't working right for dijit.form.Form (the handler wasn't being called), unless you had breakpoints in firebug. Very strange. Refs #3835.

comment:6 Changed 12 years ago by bill

(In [9772]) Fix printing of dates in debug output, and add comment. Refs #3835.

comment:7 Changed 12 years ago by bill

(In [9773]) Convert Form test to DOH format. Refs #3835.

comment:8 Changed 12 years ago by bill

Owner: changed from bill to joose

comment:9 Changed 12 years ago by joose

in 0.4.x I have isValid method. So when implementing, you can do if (myForm.isValid()) { myForm.submit(); } .. Why like this and not to implement in submit method? Because in some cases of usuablity, it is smarter to allow submitting of invalid values.

comment:10 Changed 12 years ago by bill

You'll have to show me the case where you want to submit a form with invalid values.

Also, I want the submit button to change enabled/disabled state based on whether or not the form data is valid. So we need some kind of infrastructure for that, for form widgets to report their state upwards to the Form widget.

comment:11 Changed 12 years ago by Adam Peller

Milestone: 1.02.0

getting too late for new widgets in 1.0. should this start in dijit or dojox?

comment:12 Changed 12 years ago by Adam Peller

Milestone: 2.01.0

oh, silly me, this has landed already.

this ticket is getting kinda long. Can we break out the issues and close this (in 0.9?) We shipped something with 0.9, I guess?

comment:13 Changed 12 years ago by Adam Peller

ping?

comment:14 Changed 12 years ago by bill

Milestone: 1.00.9
Resolution: fixed
Status: newclosed

OK, remaining tasks broken out into #4408 and #4692 (and also #4693 is related).

Note: See TracTickets for help on using tickets.