HTML Logo by World Wide Web Consortium ( Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.

[CLOSED] Comcode block printing issue

Login / Search

 [ Join | More ]
 Add topic 
#103411 (In Topic #20244)

Honoured member

Question here for the experts!!

I have a regular old Comcode page that has a user-fillable form on it.

Recently, the request came in that the people who are using the form, would also like to be able to print a copy of it (with their information they entered into the form included on the printout).

I inserted the "side_printer_friendly block" on the bottom of the page that has a catalog based form on it, thinking this would be a simple, quick solution

However...  When I test the solution out and fill out the form with test data and click the "Print This Page" link, it opens a new window, but all the fields that I just filled in are missing the data???  

I don't know if I missed a configuration somewhere, but what I'd like to know is if there is a way for the block to print the page, including the information that has been entered into the form fields?

Thanks very much :)


Last edit: by superiorpyro
Back to the top

I took a look at the docs for this block and it's not clear, so I am re-wording:

Get a printer-friendly version of the current page. This is used for loading a version of the current page with a signal that it will be printed. This allows the software or theme to perform various customisations beyond the CSS print stylesheet capability, as well as automatically open up a print dialog. Note that any form contents are lost.

If you just want a print button, use some HTML (OTTOMH):


<button onclick="window.print(); return false;">Print</button>

It won't do everything the print block does, as ocPortal won't have loaded in print mode – however the CSS print media stuff handles tidying up output for printing quite well on its own.

Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top

Honoured member

Thanks Chris.  I seem to have a knack for finding these types of requests that are "jusssst" outside the standard functionality :lol:
Back to the top
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: