I have a list with an InfoPath form published to it. I have a request to have a print button functionality added.

I have seen that on Form Libraries this was doable but how about a List Form?

1 Answer 1


I think you cannot have code for List form instead we can have for Library form.

but you can try to

  • add a InfoPath form web part and place the InfoPath list form on that web part.
  • add a content editor web part with the following func to reference the form (div) directly:

function printInfoPathForm(){ var ipForm = $(INFOPATH_FORM); if (ipForm) { //build html for print page var html = "<HTML><HEAD>\n"+ $("head").html()+ "</HEAD>\n<BODY>\n"+ ipForm.html()+ "\n</BODY></HTML>"; //open new window var printWP = window.open("","printWebPart"); printWP.document.open(); //insert content printWP.document.write(html); printWP.document.close(); //open print dialog printWP.print(); } }

You can also check


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.