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)
dynamically adding data to replicant field
madmax
hi everybody ,
i know u just can not add replicant dynamically in the dct. but is there any other way i can add dynamic data to replicant field. what if i use
<if (calloutForm.elements
.name == '$element_name')> then loop through the <calloutForm.elements
.value> and put my data .
any suggestions.
Find more posts tagged with
Comments
madmax
for (i =0 ;i < calloutForm.elements.length ;i++) {
if (calloutForm.elements [i ].name =='$element_name') {
calloutForm.elements [i ].value = wa;;
calloutElementFound =true;
break;
}
}
now i have 2 array and i want to populate dct with those array.so i code ----
for (i =0 ;i < calloutForm.elements.length ;i++) {
if (calloutForm.elements [i ].name =='$element_name') {
for (var j = 0; j < myArray.length;j++){
calloutForm.elements [i+j ].value = myArray1; //both array has the same length
calloutForm.elements [i+j+1 ].value = myArray2;
}
calloutElementFound =true;
break;
}
but it is not working.
i am trying to put those array data to two consecutive field. any idea what whould i do ?
JeremyH
Which version of TeamSite are you using?
I've had callouts automatically populate replicant fields - but only specific fields. There are also a number of javascript gotchas (especially with IE)
madmax
teamsite 6.1 . yeah i am doing it with java script but it's given me unexpected error.
shanon
is the callout specifically for the replicant field you're trying to set data to? if so, your callout will already have the complete ID of the form element you'd like to modify. check the environment variables in your callout and/or the FormsPublisher docs on callouts.
you certainly do not need to loop through the form fields. if ever, you use document.getElementById() nowadays.
if you can explain better how you're calling the callout and which fields you're trying to modify, i can give you more specifics... posting the DCT along with it couldn't hurt either.
Shanon Levenherz
Mercer eBusiness Team
shanon.levenherz@mercer.com
http://www.mercerhr.com