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)
Add Replicant Event
cheeku
Hi all,
I want to capture replicant events.i.e. whenever i am clicking on '+' button to add another replicant item, i want to add some extra functionality along with the existing functionality
can anybody give me the sample code for the same
Regards
Find more posts tagged with
Comments
Adam Stoller
If you're running 6.5 - this functionality is provided OOTB (RTFM FormAPI manual)
If you're running pre-6.5 - I believe there have been documented hacks for doing this in these forums - and I'd suggest you do a bit of searching.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Migrateduser
In cheeku's defense, the 6.5a FormAPI docs are in need of some TLC. If one were to read only the section on Events (pp. 19-24), one might get the impression that the only events exposed were onItemChange and the various save events. The new replicant events are very cleverly hidden in the chart on pp. 57ff. On the other hand, they are very nicely indicated in the index.
Migrateduser
I think the webcast for 6.5 forms publisher has code examples, I don't recall if they covered this particular case or not.
Here's the link:
http://devnet.interwoven.com/site.fcgi/webcasts/docs/webcast-recordings.html#webcast04-23
hth,
lissa
rodigz
Hi there,
Using formapi, how will i get the value of flag. Let say it will output 'Y'.
I'm using ts 6.5 .
thanks,
<item name="main_item">
<replicant min="0" max="2" hide-name="f" readonly="t" default="0">
<item name="flag">
<label>Active?</label>
<radio required="t">
<option value="Y" label="Yes"/>
<option value="N" label="No"/>
<option value="C" label="C" />
</radio>
</item>
<item name="Feature">
<label>Link Text</label>
<text required="f" size="50" maxlength="50">
</text>
</item>
</replicant>
</item>
jbonifaci
RTFM... look at getItem(), getValue() and getOptions().
rodigz
what's wrong with my code?
var activeItemValuerep = IWDatacapture.getItem("/main_item[1]/flag/");
var myOptions = activeItemValuerep.getValue();
alert("New Value:" + myOptions);
thanks.
jbonifaci
Well, what is happening? I can guess, but posting what is actually happening and what you think should be happening is helpful. But, as I said before, if you read up on getValue and getOptions, you should be able to do what you are trying. Right now, I see you are only using getValue, you will also need to use getOptions.