Question about custom print buttons

We would like to add a custom print button to a form that will print out a specific template. We tried using the code provided from the wiki: [url]http://agileappscloud.info/wiki/HowTo:Add_a_Custom_Print_Button_to_a_Form[/url], but to no avail.

After playing around with some JavaScript, we were able to get a button appended to a form and print out what appears on the screen. However, this is not the solution we are looking for.

Has anyone else had any similar issues, and if so, how did you get around them.

Thank you

In Custom javascript you can achive this.

On Formscript Onload section write bellow codes

var html = “

  • “Print
”;

$(“.case_details_forms”).find(“.case_submit_button”).parent().parent().prepend(html);

On Reusable Section write bellow code

function print2()
{
document.getElementById(“printTemplateActionLi”).getElementsByTagName(“a”)[0].click()
}

It will show a print button on your form and onclick the button you will get the popup to select your custom template to print. This button will do the same action which is present in right panel action menu. Hope this helps.