Re: [WF2] 6.2. Seeding a form with initial values -- contradiction in algorithm step 5

2007/9/10, Weston Ruter:
> I believe there is a contradiction in step 5 of the algorithm defined by Web
> Forms 2.0 section 6.2 "Seeding a form with initial values" [1]. In the last
> clause of the second paragraph it states that all radio buttons and
> checkboxes must be skipped over if they "have the exact name given but have
> a value that is not exactly the same as the contents of the field element."
> However, four paragraphs later it states that checkboxes (and I suppose
> radio buttons as well) may be unchecked by means of an empty field element
> with a matching name attribute:
>
> > The only values that would have an effect in this example
> > are "", which would uncheck the checkbox, and "green",
> > which would check the checkbox.
>
> Obviously the non-empty value of an input element (such as "green") is not
> exactly the same as the contents of an *empty* field element that has a
> matching name.
>
> Any thoughts?

Isn't it related to the paragraph just above: "if it is a
multiple-valued control but it is the first time the control has been
identified by a field element in this data file that was not ignored,
then it is set to the given value (the contents of the field element),
removing any previous values" where "a multiple-valued control is one
that can generate more than one value on submission"? and to the end
of the second paragraph of ths same fifth step: "walking the list of
form controls associated with the form until one is found that has a
name exactly equal to the name given in the field element's name
attribute, skipping as many such matches as is specified in the index
attribute"?

I must concede that the example is not clear at all about that ""
value and when and in which conditions it affects the checkbox.

-- 
Thomas Broyer

Received on Tuesday, 18 September 2007 18:49:51 UTC