You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bart Molenkamp <b....@bizzdesign.nl> on 2004/08/24 12:10:56 UTC

Forms with "conditional" parts

Hi,

I need to create a form on which a user can select some option, and
depending on that option, needs to fill in some other fields. For
example:

(*) option X
    field A [_______________}
    [X] some boolean

( ) option Y
    upload widget [_______________________] [browse...]
    ( ) some selection list
    (*) ...
    ( ) ...

( ) option Z
    field B [________________]
    field C [________________]

I the sample above (I hope that the ASCII art is clear), I've selected
option X, which means that I need to fill in "field A" and "some
boolean". When I've selection option X, I don't want to validate any
children under "Option Y" and "Option Z". What would be the best way to
do this? Do I need to write my own widget for that?

Bart.

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


Re: Forms with "conditional" parts

Posted by Timur Izhbulatov <ti...@yxo.ru>.
В Втр, 24.08.2004, в 14:10, Bart Molenkamp пишет:
> Hi,
> 
> I need to create a form on which a user can select some option, and
> depending on that option, needs to fill in some other fields. For
> example:
> 
> (*) option X
>     field A [_______________}
>     [X] some boolean
> 
> ( ) option Y
>     upload widget [_______________________] [browse...]
>     ( ) some selection list
>     (*) ...
>     ( ) ...
> 
> ( ) option Z
>     field B [________________]
>     field C [________________]
> 
> I the sample above (I hope that the ASCII art is clear), I've selected
> option X, which means that I need to fill in "field A" and "some
> boolean". When I've selection option X, I don't want to validate any
> children under "Option Y" and "Option Z". What would be the best way to
> do this? Do I need to write my own widget for that?
> 
> Bart.

Think you could chek the carselector sample. It demonstrates CForms
event handling.
Alternatively, you could create a separate form for each case
-- 
Timur Izhbulatov <ti...@yxo.ru>

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