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.
ruiascensao
Posts: 177 Joined: Tue Nov 15, 2011 2:24 pm
Unread post
by ruiascensao » Sun Sep 07, 2014 12:24 pm
Hi,
How can I use Javascript to have the subform "Delete" tick box checked/unchecked?
Code: Select all
var subFormPrefixes = nuSubformArray('inv_items', true);
$('#'+subFormPrefixes[index]).prop('checked', false);
//uncheck tick box
How can I have the " delete" tick box readonly?
Code: Select all
$('#'+subFormPrefixes[index]).attr('readonly',true);
Is this correct?
BR
Rui
admin
Site Admin
Posts: 2825 Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 29 times
Unread post
by admin » Tue Sep 09, 2014 12:00 am
Rui,
Do want just one or all to be readonly?
Steven
ruiascensao
Posts: 177 Joined: Tue Nov 15, 2011 2:24 pm
Unread post
by ruiascensao » Tue Sep 09, 2014 8:42 pm
Hi Steven,
I need to lock any subform rows that already have content
BR
Rui
admin
Site Admin
Posts: 2825 Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 29 times
Unread post
by admin » Tue Sep 16, 2014 6:37 am
Stop them from being deleted or even edited?
ruiascensao
Posts: 177 Joined: Tue Nov 15, 2011 2:24 pm
Unread post
by ruiascensao » Tue Sep 16, 2014 8:49 pm
Hi Steven,
Yes, Stop them from being deleted or even edited.
Thank you.
BR
Rui
ruiascensao
Posts: 177 Joined: Tue Nov 15, 2011 2:24 pm
Unread post
by ruiascensao » Tue May 19, 2015 4:01 pm
Hi Steven,
I tried to use the below code to make the subform delete object "readonly".
function lockdelete(){
var subFormPrefixes = nuSubformArray('job_part_subform', false);
$('#'+subFormPrefixes[index]+'_nuDelete').prop('disabled', true);
}
But it does not work. Any suggestion please?
BR
Rui
admin
Site Admin
Posts: 2825 Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 29 times
Unread post
by admin » Wed May 27, 2015 1:59 am
Rui,
Try hiding it..
Code: Select all
$('#'+subFormPrefixes[index]+'_nuDelete').css('visibility', 'hidden');
Steven