Hello @zukenstein
Yes, of course. After inserting the “Print Form” block in the form with the “CP Blocks” plugin, you can assign a custom class name to the fieldset field, for example field-to-print and finally, enter the following code as the onclick event in the print button:
printForm('.field-to-print');
Note: the class names are assigned to the fields through their attributes: “Add CSS Layout Keywords”
Best regards.
Hi Thanks for the superfast reply as always :).
That works in that it brings up the print preview but it doesn’t keep the layout columns in the ‘Div’ within the fieldset. It just puts them in a single column. Is there a way of maintaining the layout in the printed version?
Many thanks.
Hello @zukenstein
It takes will use only the structure into the fieldset field. So, if you want to preserve the structure of the columns, insert an “HTML Content” field into the fieldset field with a code similar to the following one:
<style>
@media print{
.column2{float:left !important;width:49.9% !important;clear:none !important;}
.column3{float:left !important;width:33.3% !important;clear:none !important;}
.column4{float:left !important;width:24.9% !important;clear:none !important;}
.column5{float:left !important;width:19.9% !important;clear:none !important;}
}
</style>
Best regards.
Thats great thanks very much