You are viewing limited content. For full access, please sign in.

Question

Question

Hide Pagination Tabs - JavaScript

asked on June 7 Show version history

Add Pages Dynamically - Laserfiche Answers

I am using the JS and CSS from the post above. I have it working as expected, however, I would like to clean up the design of the form. My hope is to only have the pagination tabs populate IF the "Add Transaction" tab is clicked on the collection. I also noticed that the "Add Transaction" only populates on the first collection. For example, if a user clicks the "Add Transaction" and goes to the second page, they will need to navigate back to the first page each time they duplicate the collection to a new page. Is there a solution to either of these design requests? 

 

I figure it will be a JS but I could not locate any JS through LF Answers that provides a solution. 

 

Page 1:

 

Page 2: No "Add Transaction" option.

Thanks!

0 0

Replies

replied on June 12

@████████, I am hoping that you may be able to provide some insight in this? Any advice is appreciated. Thank you!

0 0
replied on June 12

That script was written with the assumption that there is a start page and an end page around the transactions.  The actual collection itself is sitting on the first page, so that is also where the link to add a new row to the collection is as well.  The link to add additional transactions is not making a new collection on each page, it's moving the row out of the collection and into the new page (it's rearranging the DOM of the page).

With your screenshot, you are showing the first transaction on the first page - so that is where the collection actually lives along with the first transaction.  So this is different than the original script that would have the collection on a "start" page before the first transaction.

I haven't tried it, but if you want the add row link to move to the last transaction page, you'll need to tweak the Javascript so that after it moves the row out of the collection to the last tab, that it also moves that link to the last tab.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.