How to print a page of a form

This area is devoted to Magento Form Builder SmartFormer Gold. Please ask questions, report bugs and share ideas here.

How to print a page of a form

Postby IToris team » Wed Dec 28, 2011 2:53 pm

Please use the following step-by-step instruction:

1. add new div element on your last page with id=for_print. Set property inner-html on Properties list to text e.g.:
Code: Select all
Field 1:{field1}<br />
Field 2:{field2}<br />

where field1 and field2 is names of your fields

2. add button "type 1" on this page, open Properties List of this button, open tab Events and add the following code on the on-click event:
Code: Select all
printSpecial();


3. open Tools - JS editor and add the following code at the end:

Code: Select all
function printSpecial() {
var pagina = document.getElementById('for_print'); //Draw attention, for_print instead sfg_fieldset
var pagimp = window.open("about:blank",null,"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no"); //more handy popup
pagimp.document.write(pagina.innerHTML);
pagimp.document.close();
pagimp.print();
pagimp.close();
}


4. save the changes

IToris Team
IToris team
Site Admin
 
Posts: 1355
Joined: Mon Jan 19, 2009 12:33 pm

Return to SmartFormer Gold for Magento

Who is online

Users browsing this forum: No registered users and 1 guest