Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Dynamic DCT
abhishek_gupta
Hi,
I have to make a dynamic DCT. Dynamic in the sense that when the user selects a value from a drop-down, the rest of the DCT should be populated automatically according to the selection in the drop down.
Citing an example. I have 3 values in the dropdown, a,b and c. When the user selects 'a', 2 text boxes of replicants should get shown up automatically below the drop down. Then when I go to the same drop down at the top, and select b, a textarea comes up below. And when I select 'c' in the same dropdown above, a text boxe and a textarea shows below.
Is there any way to do this. I presume this can be done via FormAPI, but am not to sure if it can be done thru simple templating.
Thanks for the help in advance.
Abhi
Find more posts tagged with
Comments
JonathonG
This is exactly the sort of thing that FormAPI was created for. Not sure what you mean by "simple templating" but if you're asking if it can be done without FormAPI, I'd have to say the answer is no.
With FormAPI, it's pretty straightforward. Simply define all of the elements in your datacapture.cfg and then use an onChange event handler to hide/show things based on the value in your dropdown. I believe that some of the examples shipped with FormAPI will be of assistance.
Jonathon
Interwoven Architecture Consultant
abhishek_gupta
Thanks for the prompt reply.
Well by simple templating I just meant, without using any of the formapi stuff.
Well, so I understand this has to be done by Formapi and there's no other way. I'll have to have a look at the FormApi examples.
But if I want to click on the plus sign of the replicant, and a small select box appears, where I can just select the option I want and then the corresponding text boxes would appear below. Can this be done without formapi?
Thanks,
Abhi
iwovGraduate
Look at the documentation of the <container> tag with <or>.
You can have something like
<container... combination="or">
<item 1 ...>
<item 2 ...>
</container>
When you click the + sign, you can choose whether to add item 1 or item 2. I think that might solve your problem ?
Edited by iwovGraduate on 06/11/03 12:24 PM (server time).