Print button placed on form, double-click and selected Edit Form Code. Microsoft Script Editor opens and requires code to print on click with js coding.
This is what I see at the moment:
"// The following line is created by Microsoft Office InfoPath to define the prefixes
// for all the known namespaces in the main XML data file.
// Any modification to the form files made outside of InfoPath
// will not be automatically updated.
//<namespacesDefinition>
XDocument.DOM.setProperty("SelectionNamespaces", 'xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-12-19T13:12:04"');
//</namespacesDefinition>
//=======
// The following function handler is created by Microsoft Office InfoPath.
// Do not modify the name of the function, or the name and number of arguments.
//=======
function CTRL1_5::OnClick(eventObj)
{
//write your code here
}"
What code do I put in there enabling user to print the form when selecting the print button?