cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <kschnei...@gmail.com>
Subject Re: CForms Javascript Validation
Date Tue, 14 Feb 2006 13:07:55 GMT
On 2/14/06, Stewart, Gary <Gary.Stewart@luht.scot.nhs.uk> wrote:
> Hello,
>
> I'm using Cocoon 2.1.8 and attempting to develop a few CForms. I've been working on validating
the forms and for some widgets I'm attempting to use Javascript but it doesn't seem to be
working. I looked at the sample files and could only find Javascript validation for the whole
form. Is it possible to do something like:
>
> <fd:field id="foo" >
>         <fd:label>Foo:</fd:label>
>         <fd:datatype base="string"/>
>         <fd:validation>
>                 <javascript>
>                    return false;
>                 <javascript>
>         </fd:validation>
>         <fd:on-value-changed>
>             <javascript>
>               this.validate();
>             </javascript>
>         </fd:on-value-changed>
> </fd:field>
>
> obviously the validation would normally be more complex but I figured this is the easiest
to get to work.
>
> Also does it matter if you use the namespace <fd:javascript /> or should javascript
always be in the xmlns="" namespace?

Use <fd:javascript>...</fd:javascript>

> Thanks (and sorry to keep throwing so many CForms questions),
>
> Gary

--
Kris Schneider <mailto:kschneider@gmail.com>

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


Mime
View raw message