Javascript for cdd and/or checkbox element in repeat group?

sales2010

Well-Known Member
Hello,

I'm trying to find the proper syntax for the following situations when a group is set to "Repeated" = Yes.

1. cdd element rendered as checkbox
2. checkbox element in a repeat group

for first situation i already tried this but i get the message that element is null:

Code:
form_13.formElements.get('join___168___buy_pie_repeat_pie_topping___pie_topping').getValue().each(function(v){
   if (v === 'x') {
      // do x
   }
   else if (v === 'y') {
      // do y
   }
});

for the second situation i get the message that formElements is undefined:


Code:
var subElements = form_47.formElements.get(contracte_campuri___camp_extraoptiuni_vm').subElements;
var firstCheckBox = subElements[0];
if (firstCheckBox == 11) {
$('group568').show();
}


What i need is to show/hide other fields/groups in form. Please, it's urgent..

Thank you
 
presuming you were using the joinelement-in-repeatgroup branch there was a bug here where the name was not built correct.

I've fixed that and now the element in a non-repeat group has a key:

tablename___elementname

and in a repeating group:

repeattablename_elementname_N

where N is the repeat group number

-Rob
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top