Do you plan to add a 'copy line' button to the subform?
Or add it yourself to js?
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Button to copy a line of a subform
-
- Posts: 366
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: Button to copy a line of a subform
An error in this function - the st variable is missing:
Code: Select all
function hideLastCloneButton() {
var r = nuPad3(nuSubformObject(sfId).rows.length - 1);
cloneButton = st + nuPad3(r) + btnCloneId;
nuHide(cloneButton);
}
-
- Posts: 366
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: Button to copy a line of a subform
I've already used this ... but the last line is still visible.kev1n wrote:Replace st with sfId.
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
-
- Posts: 366
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: Button to copy a line of a subform
On the last line, the button should be hidden.And if there are no filled lines, then the button should also be hidden.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Button to copy a line of a subform
Did you add an afterinsertrow event as described in the article? This will hide the clone button of the last row.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 366
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: Button to copy a line of a subform
Now it works, but wrong ... The 'Clone' button is missing on the copied line, but it appears on the last line.
I also find it a disadvantage that the cloning function is slow. With 12 columns, after pressing the copy button, the function starts working after 2-3 seconds.
But if you save after each copy, then everything is displayed correctly, but this is the wrong editing method.I also find it a disadvantage that the cloning function is slow. With 12 columns, after pressing the copy button, the function starts working after 2-3 seconds.
You do not have the required permissions to view the files attached to this post.