Hi.
I have a form with 2 subforms. One of them is cloneable, the second is not.
When I press the Clone button, the first form remains filled up with records (and it is perfect), but the second becomes totally empty, even without starting empty row, so I cannot fill this subform by new records.
I need tht starting row in the second subform.
How to display it?
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.
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.
Cloned subform is empty
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact:
Re: Cloned subform is empty
Hi,
Could you try this updated nuEmptyNoClone() function ? Replace the one in nuform.js.
Could you try this updated nuEmptyNoClone() function ? Replace the one in nuform.js.
Code: Select all
function nuEmptyNoClone() {
const noclone = nuSERVERRESPONSE.noclone;
if (!noclone || !Array.isArray(noclone)) return;
noclone.forEach(function(item) {
if (item.subform) {
$('#' + item.id + 'scrollDiv .nuSubform1, #' + item.id + 'scrollDiv .nuSubform0').each(function() {
if (this.id !== item.id + '000nuRECORD') {
$(this).remove();
}
});
$('#' + item.id + '000nuRECORD').children().each(function() {
if ($(this).hasClass('nuEdited')) {
$(this).val('');
if ($('#' + this.id + 'button').length) {
$('#' + this.id + 'code, #' + this.id + 'description').val('');
}
}
});
$('#' + item.id + '000nuDelete').prop('checked', true);
$('#' + item.id + '001nuRECORD').remove();
} else {
$('#' + item.id).val('').trigger("change");
}
});
}
-
- Posts: 30
- Joined: Wed Sep 06, 2023 12:45 am
Re: Cloned subform is empty
I'm not certain if my issue is the same, when cloning a subform the subform looks fine but after saving the object list is empty on the new cloned subform. Is this a fix for this issue? Thanks.
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact:
Re: Cloned subform is empty
I just tried to clone an access level and I don't experience that problem.
Please provide more details.
Please provide more details.
-
- Posts: 30
- Joined: Wed Sep 06, 2023 12:45 am
Re: Cloned subform is empty
the issue is when cloning a form based upon a view, when I cloned the same form based upon a table it worked, but when cloning a form based upon a view, the object list is empty. I can create the form manually and input the objects using fast form, there is a word around, just could not figure out why the object list was empty. Thanks.