Hey Grzegorz,

if I get you right, I would have to build a form definition for any possible 
combination of upload fields (which is not so much) and create according pipes.
This sound like a good attempt, but how do decide, which pipe to take? I still 
need the extra information from the data.xml and I need to process it to find 
out, which fields to show or which form to use. I am still not clear about, how 
I can do that.

greetings,
Henrik

-------- Original-Nachricht --------
Datum: Wed, 07 Mar 2007 16:15:44 +0100
Von: Grzegorz Kossakowski <[EMAIL PROTECTED]>
An: [email protected]
CC: 
Betreff: Re: Hiding fields according to data.xml entry

> [EMAIL PROTECTED] napisał(a):
> > Hello,
> >
> > I need some help with cocoon 2.1.10  and cforms.
> > I am looking for a way to show or hide upload fields (including their
> label) according to a list of values loaded from a xml file.
> >
> > Concrete:
> > When selecting a documenttype from a combobox I need the system to show
> a list of upload fields which is defined in the datafile.
> > <doctypes>
> >
> > <doctype name="first">
> > <uploadfield type="xml"/>
> > <uploadfield type="doc"/>
> > <uploadfield type="pdf"/>
> > </doctype>
> >
> > <doctype name="second">
> > <uploadfield type="doc"/>
> > <uploadfield type="pdf"/>
> > </doctype>
> >
> > </doctypes>
> >
> > When the doctype "first" is selected from the combobox, the uploadfields
> for xml, doc and pdf have to appear on the screen. If "second" is selected
> only doc and pdf should be shown.
> >
> > I am able to hide and show the fields if any value is selected or not
> with the following script within my formdefinition. I am also able to fill
> the document combobox from the data.xml file. but I do not know what to to to
> load the uploadfield-values from the data.xml file and react accordingly.
> >
> > Any help would be greatly appreciated.
> >   
> Instead of hiding particular widgets I would just build form definition 
> based on user's selection. Basically you have to build a pipeline that 
> will generate form definition and form template based on user's choice. 
> If you need further help/advice just ask.
> 
> -- 
> Grzegorz Kossakowski
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to