Hi,
New day brings a new challenge. Hers is my problem: In repeat group I have dbjoin element and multi checkboxes. When user select Item in dbjoin element in same group I like to set checkbox element depending on Ajax result. I can get the proper values for checkbox element...but I can't find proper method to set which checkbox is checked. Here is what I have for now:
Any sugestions?
New day brings a new challenge. Hers is my problem: In repeat group I have dbjoin element and multi checkboxes. When user select Item in dbjoin element in same group I like to set checkbox element depending on Ajax result. I can get the proper values for checkbox element...but I can't find proper method to set which checkbox is checked. Here is what I have for now:
JavaScript:
// console.log(value_chk); // from userAjax we get ["1","3"]
for (var i = 0; i < value_chk.lenght; i++) {
jQuery('input[type=checkbox]' + elem_chk.element.id + '[value="'+value_chk[i]+'"]').prop('checked', true);
}
Any sugestions?