when i use the codes bellow in the doctype form it works but it doesnot work on the web forms
frappe.ui.form.on(“Student Applicant”, “refresh”, function(frm){
frm.add_custom_button(“PDF”, function(){
var myWin = window.open(‘http://localhost:8080/api/method/frappe.utils.print_format.download_pdf?doctype=Student Applicant&name=’+cur_frm.doc.name+‘&format=invoice%20print%20format&no_letterhead=0&letterhead=oais&settings=%7B%7D&_lang=en’);
});
});
I would like to create a button on the web form to download that form in pdf form… please help
when i use the codes bellow in the doctype form it works but it doesnot work on the web forms
frappe.ui.form.on(“Student Applicant”, “refresh”, function(frm){
frm.add_custom_button(“PDF”, function(){
var myWin = window.open(‘http://localhost:8080/api/method/frappe.utils.print_format.download_pdf?doctype=Student Applicant&name=’+cur_frm.doc.name+’&format=invoice%20print%20format&no_letterhead=0&letterhead=oais&settings=%7B%7D&_lang=en’);
});
});
I would like to create a button on the web form to download that form in pdf form… please help