Re: CForms Javascript Validation

2006-02-14 Thread Kris Schneider
On 2/14/06, Stewart, Gary <[EMAIL PROTECTED]> 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 > a

Re: CForms Javascript Validation

2006-02-14 Thread Robin Wyles
Like this... Foo: return yourValidationMethod(widget); The JS you use for validation must return true/false depending on the validation success. There are samples of custom validation with JS in th

CForms Javascript Validation

2006-02-14 Thread Stewart, Gary
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

cforms javascript validation

2004-11-24 Thread Joose Vettenranta
Hello, when form is loaded and data inputted in valid way -> OK when form is loaded and phone or email field is left missing -> comes a failure page OK when only phone is entered -> comes a failure page ERROR when only email is enetered -> validates OK when both are defined -> validates OK so why

Re: cforms + javascript validation + i18n [solution]

2004-08-11 Thread Phil Snowdon
Don't need any modification to source. You can use: ValidationError err = new ValidationError(new I18nMessage("msg.key", "catalogue")); this uses the ValidationError(XMLizable) constructor in the class you mention. >>> [EMAIL PROTECTED] 12/08/2004 1:47:06 a.m. >>> Seems like src\blocks\forms

Re: cforms + javascript validation + i18n [solution]

2004-08-11 Thread Joose Vettenranta
Seems like src\blocks\forms\java\org\apache\cocoon\forms\validation\ValidationError .java has to be changed to accept catalogue with it, so it can work. public ValidationError(String errorMessageKey, String catalogue) { this.saxFragment = new I18nMessage(errorMessageKey, catalogue);

Re: cforms + javascript validation + i18n

2004-08-11 Thread Joose Vettenranta
Additional information: if false -> true, it does i18n -message.. but how do I define catalogue which it uses? I would like to leave default forms message in one place and custom stuff in another.. - Joose 11.8.2004 kello 15:50, Joose Vettenranta kirjoitti: Hi, I have like if (ema

cforms + javascript validation + i18n

2004-08-11 Thread Joose Vettenranta
Hi, I have like if (email.value == null && phone.value == null) { email.setValidationError(new Packages.org.apache.cocoon.forms.validation.ValidationError("Atleast another one", false)); and it works.. But how can I make that i18n-capable? so it will be translated

Re: CForms javascript validation

2004-07-14 Thread Adam Walsh
Ah, that makes sense :) Thanks Joerg, that was exactly what I needed. Adam Joerg Heinicke wrote: On 15.07.2004 05:30, Adam Walsh wrote: Hi, I have a form with two fields in it, where at least one of the fields must be filled in, and I've put a bit of javascript to check it in the form definition:

Re: CForms javascript validation

2004-07-14 Thread Joerg Heinicke
On 15.07.2004 05:30, Adam Walsh wrote: Hi, I have a form with two fields in it, where at least one of the fields must be filled in, and I've put a bit of javascript to check it in the form definition: field 1 if (widget.getValue() == null &&

CForms javascript validation

2004-07-14 Thread Adam Walsh
Hi, I have a form with two fields in it, where at least one of the fields must be filled in, and I've put a bit of javascript to check it in the form definition: field 1 if (widget.getValue() == null && widget.getParent().lookupWidget("fiel