Thanks, I've got it working using unions and structs now. :)
-----Original Message-----
From: Stephane Delort [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 5:36 PM
To: [EMAIL PROTECTED]
Subject: Antwort: Forms with "conditional" parts
Hi Bart,
I guess you should have a look at classes, struct and unions to do this
job.
At least to have a clear definition file.
To get started, you could have as definition file :
<class myclass>
<field OptionXYZ>
<selectionlist>
<item x>
<item y>
<item z>
</field>
<union based on the values of the OptionXYZ field>
<struct fieldAandboolean>
<field field a>
<boolenafield fieldB>
</struct>
<struct WhenYIsSelected>
<new class myclass> <!-- recursive creation is I understdood
the
ascii art the right way-->
</struct>
<struct whenZIsSelected>
<field fieldB>
<field fieldC>
</struct>
</class>
<struct basestruct>
<new myclass> <!-- as a new instnce of a class is
always
in a container widget-->
</struct>
You will understand that this definition filewas made quickly and the
syntax is not correct.
Thus, base ideas are here.
hope this helps,
Stephane
Bitte antworten an [EMAIL PROTECTED]
An: <[EMAIL PROTECTED]>
Kopie:
Thema: 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]