Page 1 of 1

Subform checkbox readonly

Posted: Mon Sep 22, 2014 8:37 pm
by ruiascensao
Hi,

I have a subform with checkboxes and when they are checked I need to change them to readonly.

I have tried to use:

Code: Select all

function lockReplaced(){
var subFormPrefixes = nuSubFormArray('replaced_subform');
for (var index in subFormPrefixes){
 if ($('#'+subFormPrefixes[index]+'replaced_deliv').val()=='1'){
          $('#'+subFormPrefixes[index]+'replaced_deliv').attr('readonly',true);
 }
 }
}
But it does not work.

Any advice?

Thank you!

Re: Subform checkbox readonly

Posted: Tue Sep 23, 2014 5:11 pm
by ruiascensao
Hi,

I have found the issue! I need to have:

Code: Select all

$('#'+subFormPrefixes[index]+'replaced_deliv').prop('disabled', true);

Re: Subform checkbox readonly

Posted: Mon Sep 29, 2014 4:02 am
by massiws
.