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)
Form API
Ravidialog
Hi,
I am using Form API to set the visibility of container item. But it does not set to false.
Please help.
index=wsRoot+"/FileLinks";
i=1;
while (obj=IWDatacapture.getItem(index+"["+i+"]"))
{
obj=IWDatacapture.getItem(index+"["+i+"]"+"/SplitPageRange");
obj.setVisible(false);
i++;
}
But it works for not container items.
Ravi.
Find more posts tagged with
Comments
Adam Stoller
This question would be better posted in the Templating forum
You don't mention which version of TS / TST you are using - and it might make a significant difference
It's difficult to understand your code - you are using 'obj' within the while loop and then immediately re-assigning it within the loop
It might help to see your DCT so we can understand the structure you are trying to manipulate
Using a variable named "index" is probably not good practice, as it might run into a reservered word issue
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Ravidialog
Please provide the sample code which set the container item to invisible.
Ravi
Ravidialog
hi,
I have managed to find the problem in <item name="FileLinkText" rowcontinue="t"> change it "f". it works.
but my problem is.
I have got 3 fields in container. depends on one of the above field (out side the container), I need make one of the container field invisible.
How do I do it. This should ensure that + in container should show only required 2 fields. not 3.
hidden does not work for me.
Ravi
Adam Stoller
Other than the fact that it sounds like you may have found a bug with respect to FormAPI and rowcontinue="t" - please re-read my original response.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Ravidialog
I hope I can get a answer.
skapelle
Are you using the onFormInit Event?
<code>
function init() {
// your code
}
IWEventRegistry.addFormHandler("onFormInit", init);
</code>
I had a similar problem in TS6.1 and using the event solved the problem.
Regards,
skapelle