Hello,
In my form, when
the user submit it, I would like to display the list of required input that
are empty.
I use the
xforms-submit-error event in order to display a message, but
can I get the list of
invalid input ?
ex :
<xforms:submission id="Valider" action="./page5" method="post"><xforms:action ev:event="xforms-submit-error"> <xforms:setvalue ref="/form/erreur">Des champs obligatoires ne sont pas remplis !</xforms:setvalue> </xforms:action> </xforms:submission> thank you. Julien.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Julien,
Note that recently we changed the notion of what it means to be "valid", in anticipation from a change in the XForms 1.1 spec (a change which we hope will go through). So required-but-empty fields are now considered invalid as well, but this was not the case not so long ago. You can look at the error-summary.xhtml sample for an example of how to capture xforms-valid / xforms-invalid events and build an error summary. We use an enhanced version of this in Form Runner. -Erik On May 16, 2008, at 12:35 AM, Bittard, Julien wrote: > Hello, > > In my form, when the user submit it, I would like to display the > list of required input that are empty. > I use the xforms-submit-error event in order to display a message, > but can I get the list of invalid input ? > > ex : > <xforms:submission id="Valider" action="./page5" method="post"> > > <xforms:action ev:event="xforms-submit-error"> > > <xforms:setvalue ref="/form/erreur">Des champs obligatoires > ne sont pas remplis !</xforms:setvalue> > > </xforms:action> > > </xforms:submission> > > thank you. > > Julien. > Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Erik,
> Note that recently we changed the notion of what it > means to be > "valid", in anticipation from a change in the XForms > 1.1 spec (a > change which we hope will go through). Where is this change in the 1.1 spec? > So required-but-empty fields > are now considered invalid as well, I thought this was precisely what the addition of the xforms datatypes that mirror the built-in XML Schema datatypes allowed? If I bind a xforms datatype xforms:date to a nodeset, and also specify "required=true()", does the required MIP override the fact that the xforms datatype allows an empty string? Thanks, Don -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
>> Note that recently we changed the notion of what it
>> means to be >> "valid", in anticipation from a change in the XForms >> 1.1 spec (a >> change which we hope will go through). > > Where is this change in the 1.1 spec? It is not there yet, we just hope it will be, and so far the Working Group has been receptive to the idea. > I thought this was precisely what the addition of the > xforms datatypes that mirror the built-in XML Schema > datatypes allowed? If I bind a xforms datatype > xforms:date to a nodeset, and also specify > "required=true()", does the required MIP override the > fact that the xforms datatype allows an empty string? "required" just means the value is required. So far, this did not influence the "valid" MIP. But we think it should. A node can be invalid for multiple reasons: @type attribute, type assigned by schema, and type assigned by xsi:type; and constraint expressions evaluating to false(). The spec already says that all the constraints must be satisfied for the node to be valid. So to that list, the suggestion is to add "required but empty". One reason for this is that submission already performs this check, but the rest of XForms doesn't. So we have an inconsistency. Further, XForms 1.1 adds a @validate attribute which implicitly introduces a separate definition of validity. So in order to make everything consistent, we propose to simply include "required but empty" as one more constraint affecting validity. This way, there is less confusion, and the spec is simpler too. So the answer to your question is yes, xforms:date + @required="true()" will make the field invalid. Do you see a drawback to that? -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |