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)
Hiding item inside replicant tag using form API
dinkrn
We have a requirement where in, one of the replicant item needs to be made invisible based on the user role and also the item name should not appear in the list when I click “+” of the replicant. (Note this item appears within the tag with “combination=or”). I tried using the tag, with this approach the item is just set to read only and it is visible to the user, but I want the item not be seen to the user. I am facing a problem in implementing this.
Find more posts tagged with
Comments
Antharix
Providing the TS environment details will help.
You can achieve the functionality using the formAPI.
dinkrn
I am using TS6.5 and item is inside a replicant with "combination='or'"
claushelth
Hi
I'm interested...what happen here???
Migrateduser
id like to know how to do this also...i have a radio button in my replicant and want to dynamically show/hide items underneath depending on which radio button the press. the issue is im not sure how to hide the items initially in a replicant when there is no address yet.
-------------------
World of Warcraft
— Illidan/Horde
Adam Stoller
If you're using 6.5 there are FormAPI event handlers for replicants which makes it much easier - you would handle the initial event of the replicant being added and ensure that the fields are hidden/exposed based on the initial value of the radio-button. Then you would have an item event handler for the radio-button that, when changed would take care of hiding/exposing other fields in that replicant instance by taking the name of the item that triggered the event handler and modifying it to reference the other fields.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Migrateduser
sorry fish, i figured it out using the "onReplicantAdded" event...for some reason i downloaded the old formapi (6.0) guide which doesnt have this handler listed. i cant believe it, a FR that was actually completed!
IWEventRegistry.addItemHandler("/web_ad", "onReplicantAdded", initHide);
function initHide(item) {
var xpath = null;
if ( typeof( item.getXPath ) != 'undefined' )
{
xpath = item.getXPath();
}
else
{
xpath = item.getName();
}
var audCat = IWDatacapture.getItem(xpath + "/audience_category");
audCat.setVisible(false);
var audFirm = IWDatacapture.getItem(xpath + "/audience_firm");
audFirm.setVisible(false);
}
-------------------
World of Warcraft
— Illidan/Horde
Mohan_Babu
His these feature avaliable in 5.5.2..
Regards
Mohan
Migrateduser
no, only 6.5 to my knowledge. it was a Feature Request for a long time.
-------------------
World of Warcraft
— Illidan/Horde
jbonifaci
No, as stated above, it is only available in 6.5. You can do it in 6.1 and 5.5.2 using parent.IWDCEventRegistry.addListener('onItemAdded', insertFunction). If you do some searching through the forum, you can get some more info about this.