Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

Subform checkbox readonly

Locked
ruiascensao
Posts: 177
Joined: Tue Nov 15, 2011 2:24 pm

Subform checkbox readonly

Unread post 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!
BR
Rui
ruiascensao
Posts: 177
Joined: Tue Nov 15, 2011 2:24 pm

Re: Subform checkbox readonly

Unread post by ruiascensao »

Hi,

I have found the issue! I need to have:

Code: Select all

$('#'+subFormPrefixes[index]+'replaced_deliv').prop('disabled', true);
BR
Rui
massiws
Posts: 503
Joined: Thu May 24, 2012 2:08 am
Location: Milan, Italy
Contact:

Re: Subform checkbox readonly

Unread post by massiws »

.
Locked