cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barbara Slupik <barbara_slu...@wro.vectranet.pl>
Subject Re: CForms 2.1 javascript validation not working
Date Sun, 12 Jul 2009 15:22:32 GMT
Hello

I use cocoon-2.2.0 and do my validation like this:

<fd:validation>
	<fd:javascript>
		var success=true;
		if (some-test) {widget.setValidationError(new  
Packages.org.apache.cocoon.forms.validation.ValidationError("my- 
error",true)); success=false;}
		return success;
	</fd:javascript>
</fd:validation>

and in my flow I have:

form.load(my-data);
form.showForm("my-form");
if (form.isValid) {
	form.save(my-data);
	...
}

Barbara

On 11 Jul, 2009, at 2:42 pm, Gary Larsen wrote:

> Hi,
>
>
>
> For some reason javascript validation stopped working on all forms  
> (2.1.9):
>
>
>
>           <fd:validation>
>
>             <fd:javascript>
>
>               cocoon.log.error("test validation: return false");
>
>               return false;
>
>             </fd:javascript>
>
>          </fd:validation>
>
>
>
> The validation is fired on a submit widget yet the form is still  
> being submitted.  Would anyone have an idea what may be wrong?
>
>
>
> Thanks for any suggestions!  I’m stumped right now.
>
> gary
>


Mime
View raw message