You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ben Anderson <be...@gmail.com> on 2005/04/11 19:38:10 UTC

[Forms] validation mystery

Hi,
I've been battling this problem for a while and I'm not sure what I'm
missing.  I need to validate my form to make sure the required values
are present, so in my form definition I have something like this:

    <fd:field id="raId" required="true">
    ...
    <fd:field id="raDateTime" required="true">
    ...
    <fd:submit id="go" action-command="help" validate="true">

This is enough to guaruntee validation, correct?  However, my form is
not being validated because it is allowing empty values for raId and
raDateTime.  I've created my own xsl's to do the transformation from a
form instance to the html, and assume this must be where I'm missing
something, but I can't figure it out.

It's my understanding that a form submission should be a request with
these params:

someURI?continuation-id=xxx&forms_submit_id=&raId=&raDateTime=&go=

and this should trigger validation and rerender the page in 

form.showForm("someURI-display");

Am I missing something?  Any direction is much appreciated.
Thanks,
Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [Forms] validation mystery

Posted by Ben Anderson <be...@gmail.com>.
> if the field is "disabled", then it isn't validated - go figure.
I am correct in this assumption, right?
Is there any way to specify that I want a field to be validated even
if it's disabled?
Thanks,
Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [Forms] validation mystery

Posted by Ben Anderson <be...@gmail.com>.
Thanks for the response - I found my problem.  Duh to me - if the
field is "disabled", then it isn't validated - go figure.
-Ben

On Apr 11, 2005 7:19 PM, Adam Walsh <aw...@contal.net.au> wrote:
> Hi Ben,
> 
> Do you have something like this in your sitemap?
> 
> <map:match pattern="someURI">
>     <map:call continuation="{request-param:continuation-id}"/>
> </map:match>
> 
> Adam
> 
> Ben Anderson wrote:
> 
> >Hi,
> >I've been battling this problem for a while and I'm not sure what I'm
> >missing.  I need to validate my form to make sure the required values
> >are present, so in my form definition I have something like this:
> >
> >    <fd:field id="raId" required="true">
> >    ...
> >    <fd:field id="raDateTime" required="true">
> >    ...
> >    <fd:submit id="go" action-command="help" validate="true">
> >
> >This is enough to guaruntee validation, correct?  However, my form is
> >not being validated because it is allowing empty values for raId and
> >raDateTime.  I've created my own xsl's to do the transformation from a
> >form instance to the html, and assume this must be where I'm missing
> >something, but I can't figure it out.
> >
> >It's my understanding that a form submission should be a request with
> >these params:
> >
> >someURI?continuation-id=xxx&forms_submit_id=&raId=&raDateTime=&go=
> >
> >and this should trigger validation and rerender the page in
> >
> >form.showForm("someURI-display");
> >
> >Am I missing something?  Any direction is much appreciated.
> >Thanks,
> >Ben
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [Forms] validation mystery

Posted by Adam Walsh <aw...@contal.net.au>.
Hi Ben,

Do you have something like this in your sitemap?

<map:match pattern="someURI">
    <map:call continuation="{request-param:continuation-id}"/>
</map:match>

Adam

Ben Anderson wrote:

>Hi,
>I've been battling this problem for a while and I'm not sure what I'm
>missing.  I need to validate my form to make sure the required values
>are present, so in my form definition I have something like this:
>
>    <fd:field id="raId" required="true">
>    ...
>    <fd:field id="raDateTime" required="true">
>    ...
>    <fd:submit id="go" action-command="help" validate="true">
>
>This is enough to guaruntee validation, correct?  However, my form is
>not being validated because it is allowing empty values for raId and
>raDateTime.  I've created my own xsl's to do the transformation from a
>form instance to the html, and assume this must be where I'm missing
>something, but I can't figure it out.
>
>It's my understanding that a form submission should be a request with
>these params:
>
>someURI?continuation-id=xxx&forms_submit_id=&raId=&raDateTime=&go=
>
>and this should trigger validation and rerender the page in 
>
>form.showForm("someURI-display");
>
>Am I missing something?  Any direction is much appreciated.
>Thanks,
>Ben
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org