Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Can a container be started collapsed?
Bowker
Is there anyway to start a container collapsed? I tried setting min=0 max=1 default=0 but when you click the + it creates another container within the container and it's going to be confusing for my users.
Find more posts tagged with
Comments
Rick Poulin
You can set a threshold in templating.cfg, saying that form type X starts off with containers with depth Y or more are collapsed at form load. If you only want specific containers to start off collapsed, use FormAPI with an onFormInit, and just collapse it that way.
My Computer properties.jpg
Bowker
Thanks - I ended up putting in a script to collapse just the items that didn't have any values.
Used the TeamSite FormAPI Reference guide v7.1 Doc rev 1, Dec, 2009
[PHP]<script>
<br><br>IWEventRegistry.addFormHandler("onFormInit",<br> function () {<br> var tabs = IWDatacapture.getRootItems()[0].getChildren();<br> for (var i = 0; i < tabs.length; i++) {<br> var items = tabs<i>.getChildren()[0].getChildren();<br> for (var j = 0; j < items.length; j++) {<br> if (items<j>.getType().indexOf("container") >= 0) {<br> if (items<j>.getChildren()[0].getValue() == "") {<br> items<j>.setCollapsed(true);<br> }<br> }<br> }<br> }<br> }<br>);<br>
</script>
The basic structure of my DCT is:
*** this is the container I want to collapse if first child is empty
:
:
[/PHP]
thanks for the assist.