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

Question

Question

Set page breaks in saved form

asked on May 9 Show version history

Is there a way to choose where page breaks happen when saving a form to a repository, or any way to remove the page breaks entirely?

I have seen several answers for this but most say to say to look in the pagination for "remove page breaks from saved form", but it doesn't appear to be there in the cloud version.

I've also tried a couple of answers' css suggestions to force a break after a section, but none have worked so far.

0 0

Answer

SELECTED ANSWER
replied on May 9

This is the CSS I have on forms that have specific page breaks. You can switch it up to be before, after, etc.

Like Matthew mentioned, testing is a pain and I jumped through a lot of hoops to try and get an idea of what the actual HTML for the saved copies looked like but I haven't had any issues with this since then.

Basically, I use the pageBreak class on sections/fields where I want a page break, and the keepTogether class on items that I don't want to split between pages unless absolutely necessary due to the length.

 

.pageBreak {
  page-break-before:always;
}

.keepTogether,
.cf-table-block,
.form-q {
  page-break-inside: avoid;
}

 

4 0

Replies

replied on May 9 Show version history

Are you using the Forms Layout Designer (new designer) or the Forms Classic Designer?

Here's some CSS for the Forms Layout Designer that will force a page break in the archival version of the form.  This is based on pagination being enabled. 

/*Force page breaks when archiving to repository*/
.form-pages-container div.Page { 
  page-break-after: always; 
}

 

The Forms Classic Designer doesn't need the CSS because it has an option that can be enabled/disabled as desired with the pagination.

2 0
replied on May 9

I do not have the pagination enabled on the form as there should only be 1 page while the form is being worked on.

I already have page breaks when archiving to repository, I want to control specifically where they occur or remove them entirely.

0 0
replied on May 9

I don't think you'll be able to remove them entirely.  But you should be able to control where they are occurring.

Similar to that CSS I posted that puts the page breaks after each page with pagination enabled, we should be able to get some CSS that puts the breaks after certain items, such as after sections, or after custom HTML elements, or after items with certain CSS Class Names.

Are you using the Forms Layout Designer (new designer) or the Forms Classic Designer?  And where do you want the page breaks to occur?

1 0
replied on May 9

That would be perfect, I've been trying to style my sections to do that to no avail.

I'm on the Forms Layout Designer, either before or after a section would be great.

0 0
replied on May 9

This is proving to be more difficult than I expected.

The original CSS code I shared was provided by a Laserfiche employee (see this post), and that does work with the pagination.  However, no matter how I edit it to try to work with the sections, I can only get it to work when printing from the User Task and not when archiving to the repository.

The problem here is that there is nowhere within Forms that we can preview the version of the form that will be archived, so we can examine the structure of the form and what we need to change to alter how it appears when archived.  We can see the active version of the form, and make changes that impact that, but the archival version is structured a little different, so the changes are not impacting it the same way.

This is the CSS that I have working on the active form - but it is not working on the version of the form that archives to the repository: 

/*Force page breaks after each section when archiving to repository*/
.fl-section { 
  page-break-after: always; 
}

I can get the page breaks to work after the sections when printing from the active user task, but I can't get it to work with the archival.

1 0
replied on May 9

Is it possible to print a pdf or some other version from the user task, then save that to the repository somehow?

0 0
replied on May 9

Oh, I examined the print option from the user task and can see that won't be an option.

0 0
replied on May 9 Show version history

Unless someone else weighs in (such as a Laserfiche employee), who has experience with how the sections are structured when archived to the repository, I'm stumped on how to get it to work.  I'm sorry.

And just like that, it's @████████ to the rescue!

 

1 0
SELECTED ANSWER
replied on May 9

This is the CSS I have on forms that have specific page breaks. You can switch it up to be before, after, etc.

Like Matthew mentioned, testing is a pain and I jumped through a lot of hoops to try and get an idea of what the actual HTML for the saved copies looked like but I haven't had any issues with this since then.

Basically, I use the pageBreak class on sections/fields where I want a page break, and the keepTogether class on items that I don't want to split between pages unless absolutely necessary due to the length.

 

.pageBreak {
  page-break-before:always;
}

.keepTogether,
.cf-table-block,
.form-q {
  page-break-inside: avoid;
}

 

4 0
replied on May 10

Thank you Jason! I ended up just using keepTogether since the section lengths can vary by submission, and it looks much better. I did need to edit the classes on it a bit, your version initially would only work when printing from user task and not when saving to repository. This is what I ended up with:

.keepTogether .fl-section {
  page-break-inside: avoid;
}

Thank you both for all your help!

2 0
replied on May 10

I'm glad you found something that worked for you.

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

Sign in to reply to this post.