Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Print button on NewForm to print another version of the form

Posted on 2010-08-31
4
Medium Priority
?
444 Views
Last Modified: 2012-06-27
Thanks to the previous reply, we are happily printing eNewForm.aspx uisng a Print button. New question came up: can we program the Print button on NewForm to print a "cleaned up" version of the form - that is, another version of the form for the same list item?

Many thanks for your time.
0
Comment
Question by:TEEDA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 21

Expert Comment

by:chapmanjw
ID: 33572233
You could add a JavaScript function that loads a custom CSS stylesheet and then calls window.print().  Here is an example of loading CSS through a JavaScript function: http://www.javascriptkit.com/javatutors/loadjavascriptcss.shtml

In the CSS you could make all the "clean up" changes you need to make.  To ensure that your styles override the default SharePoint styles, be sure to include !important after each style line, for ex:

body
{
width: 100% !important;
}
0
 
LVL 4

Author Comment

by:TEEDA
ID: 33572552
I hadn't thought of using CSS - the major thing we want to hide on the "clean" version is the Print button itself. So I'd have a Print button which calls the javascript to load a custom CSS stylesheet (to hide the Print button) and then calls window.print().

Have I got that right?

Thanks for your time,
0
 
LVL 21

Accepted Solution

by:
chapmanjw earned 1000 total points
ID: 33573013
Yes, you could use CSS to hide the button during the function, or you could even use JQuery and hide the button using JQuery.
0
 
LVL 4

Author Comment

by:TEEDA
ID: 33573017
Cool!  Thanks.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question