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)
setVisible() - can it be used at item level ?
shahzamaj
setVisible() , its a method of IWItem.
Can this method only be used at setting the visible state of container or can it also be used for setting the state of an item also ?
[html]
Product Info
Product Title
Enter a Product Title
Product Code
Product ID
The ID link to a prepaid category
Category ID
Display Order
User must enter a number, meaning the position number of this product
|
|
[/html]
In this code I can the visibility state of product_info container
IWDatacapture.getItem("/product_info").setVisible(false);
Can I do same for item in product_info container as follows
IWDatacapture.getItem("/product_info/product_title").setVisible(false);
I tried this for a code, but it did not work. So I thought this could work only at container level. But when I referred to manual, it says item state can be set by setVisible(). Does it refer container as an item or can the visible state of item element in the DCT can be set setVisible() ?
Thanks
Find more posts tagged with
Comments
Rick Poulin
Your XML snippet appears to be missing a <root-container> but the answer is yes, setVisible() can be used to hide items. Remember that your path should include the root container name, like
/rootcontainername/containername/itemname
The problem could also lie with *when* your JS is called. Make sure that this type of thing is called from within a function that is triggered using the onFormInit event, otherwise you could get varying results.