We created a form and once we added our CSS to give the form a nice layout we noticed the layout of the file that is saved to the repository is really messed up. Here's what the form looks like with the CSS:
This is what the file that is saved to repository looks like:
This is the form with no CSS just a modified theme.
This is what the file saved to the repository looks like when there is no CSS in the form.
.cf-formwrap { margin: 0 auto 0; max-width: 100%; } .cf-form li { list-style-type: none; display: inline-table; } .cf-medium { width: 100%; } .margin-end { display: none; } .cf-col1 span.choice { width: auto; } .sectionLable { font-family:Arial; font-weight:normal; font-style:normal; text-decoration:none; color:#107b83; font-size:18px; } .cf-collection-append { color: #107b83; } .cf-field input[type="text"], .cf-field select { height: auto; } input, textarea { padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; border-radius: 5px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; } .seventy { max-width: 70%; } #Field20_old { color: #ffffff; font-family: Arial; font-style: normal; font-weight: bold; font-size: 14px; text-decoration: none; border-color: #107b83; background: #107b83; border-width: 1px; border-style: solid; } li.BusPurp { display: block; max-width:70%; } #Field20_old:hover, input.Submit[type='submit']:hover { background: rgba(16, 72, 77, 1); } .edit_button { margin-left: 10px !important; padding-bottom: 3px !important; padding-top: 3px !important; margin-bottom: 0; font-weight: bold; border-color: #107b83; background: #107b83; border-width: 1px; border-style: solid; border-radius: 5px; } .edit_button p { margin: 0; } .edit_button a:link { color: #FFF; text-decoration: none; } .edit_button:hover { background: rgba(16, 72, 77, 1); } @media screen and (max-width: 640px), handheld and (max-width: 640px), tv and (max-width: 640px), projection and (max-width: 640px) { .lf-responsive .cf-field span.margin-end { display:none; } .seventy { max-width: 100%; } .cf-form li { display: block; } .lf-responsive .cf-field .currency { width: 100%; } li.BusPurp { display: auto; max-width:100%; } } @media print { .cf-formwrap { margin: auto; max-width: 900px !important; } .cf-form li { list-style-type: none; display: inline-block; float: left; } .lf-responsive .cf-field .currency { width: auto; } .cf-medium { width: auto; } li.BusPurp { max-width:auto; } .seventy { max-width: auto; } } #errortext { border-style: solid; border-width: 1px; border-radius: 5px; display: block; font-weight: bold; margin-bottom: 1.11111rem; padding: 0.77778rem 1.33333rem 0.77778rem 0.77778rem; position: relative; background-color: #f04124; border-color: #de2d0f; color: #FFFFFF; }
I found this Laserfiche Answer: https://answers.laserfiche.com/questions/57981/Save-to-Laserfiche-As-Tif-Form-Width?sort=oldest. As you can see from our CSS we do have the @media print and within it we change anything with a width back to a default and the .cf-formwrap which seems to be the root cause of the havoc to 900px. However, the CSS in the @media print seems to be ignored when the form is saved to the repository. I then found this Answer: https://answers.laserfiche.com/questions/85488/Forms--Spacing-between-form-elements-changes-when-submitted-to-the-repository. I followed all of the suggestions on how to troubleshoot what the form looks like on print and in the print emulation it looks fine. If I try to print from the browser to a PDF it also looks fine. It's only when the form gets saved to the repository that it is all messed up. I found yet another Answer: https://answers.laserfiche.com/questions/125060/Forms-not-saving-to-repository-correctly#. But how would I view the read-only form as its being created into the repository? How do I adjust my CSS to affect the read-only form when I am not able to see it? We even removed all of the CSS and added back just this:
.cf-formwrap { margin: 0 auto 0; max-width: 100%; } @media print { .cf-formwrap { margin: auto; max-width: 964px; } }
However we got the same results. The file in the repository is unreadable as you see above. It's like the save to repository process is totally ignoring the @media print CSS. What do I need to do to correct this?