You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stefan Burkard <ne...@burknet.ch> on 2005/01/09 21:00:49 UTC

different flavours of the same form with cforms

hi cocoon-users

i'd like to create different flavours of a contact-form with cocoon 
forms. all flavours have some fields in common (name, e-mail, ...) but 
most of the flavours have also specialised fields. for example the form 
to submit new links has a field to type a link.

so, is it possible to create for all the flavours just one form-model?

i think the problem is that i'd like to hide for example the link-field 
for all forms but the link-form. however, IN the link-form the field has 
to be shown and it has to be a required field!

is this possible? has anybody done this already?

thanks and greetings
stefan


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


Re: different flavours of the same form with cforms

Posted by Vilya Harvey <vi...@gmail.com>.
Stefan Burkard wrote:

> i'd like to create different flavours of a contact-form with cocoon 
> forms. all flavours have some fields in common (name, e-mail, ...) but 
> most of the flavours have also specialised fields. for example the 
> form to submit new links has a field to type a link.
>
> so, is it possible to create for all the flavours just one form-model?
>
> i think the problem is that i'd like to hide for example the 
> link-field for all forms but the link-form. however, IN the link-form 
> the field has to be shown and it has to be a required field!
>
> is this possible? has anybody done this already?

One approach which I've used is to generate the CForms input files (the 
form definition, the form template and optionally the form binding) via 
an XSL transformation. That gives you all the flexibility you could 
want, although you do have to be careful with the correpsonding flowscript.

Hope that helps,
Vil.

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