You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Cocoon Newbie <co...@allthatnet.com> on 2002/04/17 22:31:21 UTC
Dynamic forms
Has anyone been able to create a form where the validation rules for
some fields dynamically change based on selections made in other fields?
For example, postalcode would be validated differently based on the
choice of country? Any ideas would be appreciated.
Thanks,
Ed
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Dynamic forms
Posted by Matthieu Benéteau <m....@quaternove.fr>.
Hi Ed,
Sorry, I hadn't really understood what you meant.
Well, I found it easier to process all the form validations on the client
side, because I have large forms with lots of elements. I check and process
them before sending, so the server task is far lighter.
I haven't tried the server-side validation.
Regards,
Matthieu
> I see your point, however since the validation is done on the server
> rather than on the client, I was hoping it to be something that Cocoon
> could accomplish.
>
> I have played it with it some more and am stuck on the "last mile". I
> can switch the validation rules, however, I still need to figure out how
> to reset the validation results from the prior validation attempt before
> re-submitted results are validated again. Otherwise, the validator seems
> to remember the prior validation result for the field, validation rule
> of which has changed, and fails it.
>
> Regards,
>
> Ed
>
> Matthieu Benéteau wrote:
>
> >This is not a Cocoon2 but a DHTML issue.
> >You have to use JavaScript.
> >
> >Try this tutorial page :
> >http://www.pageresource.com/jscript/jforms.htm
> >
> >Regards,
> >Matthieu
> >
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Dynamic forms
Posted by Cocoon Newbie <co...@allthatnet.com>.
Matthieu:
I see your point, however since the validation is done on the server
rather than on the client, I was hoping it to be something that Cocoon
could accomplish.
I have played it with it some more and am stuck on the "last mile". I
can switch the validation rules, however, I still need to figure out how
to reset the validation results from the prior validation attempt before
re-submitted results are validated again. Otherwise, the validator seems
to remember the prior validation result for the field, validation rule
of which has changed, and fails it.
Regards,
Ed
Matthieu Benéteau wrote:
>This is not a Cocoon2 but a DHTML issue.
>You have to use JavaScript.
>
>Try this tutorial page :
>http://www.pageresource.com/jscript/jforms.htm
>
>Regards,
>Matthieu
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Dynamic forms
Posted by Matthieu Benéteau <m....@quaternove.fr>.
This is not a Cocoon2 but a DHTML issue.
You have to use JavaScript.
Try this tutorial page :
http://www.pageresource.com/jscript/jforms.htm
Regards,
Matthieu
> -----Message d'origine-----
> De : Cocoon Newbie [mailto:cocoon@allthatnet.com]
> Envoyé : mercredi 17 avril 2002 22:31
> Objet : Dynamic forms
>
>
> Has anyone been able to create a form where the validation rules for
> some fields dynamically change based on selections made in other fields?
> For example, postalcode would be validated differently based on the
> choice of country? Any ideas would be appreciated.
>
> Thanks,
>
> Ed
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>