Non deletable subform

Questions related to using nuBuilder Forte.

Non deletable subform

Postby Fike » Sat Jan 27, 2018 8:35 am

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
Fike
 
Posts: 79
Joined: Fri Oct 21, 2011 4:43 am

Re: Non deletable subform

Postby admin » Sat Jan 27, 2018 11:24 am

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: 3154
Joined: Mon Jun 15, 2009 9:53 am

Re: Non deletable subform

Postby admin » Sat Jan 27, 2018 12:43 pm

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
comment2.PNG (12.39 KiB) Viewed 736 times


Steven
admin
Site Admin
 
Posts: 3154
Joined: Mon Jun 15, 2009 9:53 am

Re: Non deletable subform

Postby Fike » Sun Jan 28, 2018 5:02 pm

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.
Fike
 
Posts: 79
Joined: Fri Oct 21, 2011 4:43 am

Re: Non deletable subform

Postby toms » Sun Jan 28, 2018 5:20 pm

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.
toms
 

Re: Non deletable subform

Postby Fike » Sun Jan 28, 2018 7:53 pm

I will create a new topic describing it.

Kind regrads Toms
Fike
 
Posts: 79
Joined: Fri Oct 21, 2011 4:43 am

Re: Non deletable subform

Postby admin » Mon Jan 29, 2018 3:43 am

.
admin
Site Admin
 
Posts: 3154
Joined: Mon Jun 15, 2009 9:53 am


Return to General