Re: Re: Condition Checking on Form Submission
Posted by
Phani S on
URL: https://discuss.orbeon.com/Condition-Checking-on-Form-Submission-tp2998123p3009145.html
Alex,
There are three conditions to be satisfied.
1. At least one of them should be filled
2. If first field is filled then it should have a field length of 5 or greater
3. If the second field is filled it should have a field length of 3 or more
The submission should happen only when the conditions are met.
For example, if the first field is present and it is of length 4 then it should display a message rather than submitting. If both are present then their respective lengths must match.
On Sat, Oct 23, 2010 at 11:48 PM, Alessandro Vernet
<[hidden email]> wrote:
Phani,
All the conditions must pass before you are allowed to submit the
form. The way I understand your requirements, the issue with
conditions you had is that if field2 is provided, you don't care about
the length condition for field1. And vice-versa. So I modified the
first two conditions as follows:
<xforms:bind nodeset="condition[1]" constraint="$length2 != 0 or
$length1 ge 5"/>
<xforms:bind nodeset="condition[2]" constraint="$length1 != 0 or
$length2 ge 3"/>
I also attached the updated source. Does this do what you need for this case?
Alex
On Sat, Oct 16, 2010 at 3:44 AM, Phani Sajja <
[hidden email]> wrote:
> Hi,
> In my I have two input fields. User should provide at least one of the
> fields. Another check is the fields lengths. If field1 is filled it should
> be of length 5 or more, if field2 is filled it should be of length 3 or
> more. I have defined these conditions. If all of these are matched then the
> submission should happen. Otherwise it should open a pop up dialog and
> display what is wrong. Please see the attached code and tell me how to do
> it.
>
> --
> Regards
> Phani. S
>
>
>
> --
> 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
>
>
--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet
--
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
--
Regards
Phani. S
--
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