cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Ochs <>
Subject [CFORM] How can I remove a previous validation error from a widget?
Date Thu, 04 Aug 2005 00:20:11 GMT
Hi everyone, I'm trying to do some javascript validation with my form
that validates that at least one out of two fields are filled in.  I
put the validation element and javascript under the form element and
the validation works fine the first time I execute it.  In the
validation code I set the validation error on the SECOND of the two

If I try to submit the form without filling in any data the first
time, the validation works fine.  Then if I fix the problem by filling
in some data in the FIRST field and resubmit, the validation still
fails.  If I fix the problem by filling in some data in the SECOND
field and resubmit, the validtion works correctly.  So, I think what I
need to do is clear the validation error from the SECOND field, but
I'm not sure how to do this.

I set the error on the field by doing:
if (isvalid==false){

I have tried removing the validation error by doing this, and the
validation error is removed, but the form does not submit and I get
the page back again, but without any errors. (So I have to click
submit twice after the error is fixed)

Anyone have any suggestions of how to implement this or a way I should
reorganize my form to get this to work properly?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message