Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Non deletable subform

Questions related to using nuBuilder Forte.
Locked
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Non deletable subform

Unread post by Fike »

I created a subform and I selected the 'No' Deletable option.

However the checkboxes to delete each row of the subform still appeared.

I modified two lines of the nuform.js file to prevent appearing the delete checkboxes on each subform row, but I don't know if this could affect anything else.

To prevent creating the delete checkboxes I modified line 1188 form:

Code: Select all

nuRecordProperties(SF.forms[c], prefix, rowWidth - 40);
to:

Code: Select all

if(SF.delete == '1') nuRecordProperties(SF.forms[c], prefix, rowWidth - 40);
To reduce the rows width (to remove the space where checkboxes are placed on deletable subforms) I modified line 1106 from:

Code: Select all

rowWidth 			= rowWidth;
to:

Code: Select all

rowWidth 			= rowWidth - 30;
I don't know if checkboxes should just be hidden or if they should be not created for non deletable subforms (as is the case with this modification), so please let me know if I should do it on any other way.

Kind regrads,


Fike
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Non deletable subform

Unread post by admin »

Fike,

I think that will work well.

I have added that to the latest build.

Please test it out for us.

Steven
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Non deletable subform

Unread post by admin »

Fike,

I had to comment it out for the moment because records won't save properly if delete is set to 1.

You can try it yourself.
comment2.PNG
Steven
You do not have the required permissions to view the files attached to this post.
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Re: Non deletable subform

Unread post by Fike »

Yes, I can see that ... I have been testing some changes and I think I know how to make it work. However I noticed another strange thing with subforms.

I have just pulled the updated files from github and I found this:

When I change a field in a subform and save the form for the first time It works ok. If I change that field a second time (without refreshing the subform) it works ok again. But if I change that field for a third time and save the form the field does not get updated.

I will try to find out first why this happens and then I will test whether the changes to remove the delete checkbox on non-deletable sunforms work ok.
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Non deletable subform

Unread post by toms »

Fike wrote: When I change a field in a subform and save the form for the first time It works ok. If I change that field a second time (without refreshing the subform) it works ok again. But if I change that field for a third time and save the form the field does not get updated.
Fike, I confirm this bug.
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Re: Non deletable subform

Unread post by Fike »

I will create a new topic describing it.

Kind regrads Toms
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Non deletable subform

Unread post by admin »

.
Locked