Print, PDF, Email Button on Form

General ShopSite user discussion

Print, PDF, Email Button on Form

Postby dgroff » Tue Jul 12, 2011 8:21 am

I have a form where a user enters in information and then a detailed report is created.

Is there a way to provide a print, PDF and email button for the form? I just want the form printed, not the whole page. And a email where the form content is included or attached.
dgroff
 
Posts: 28
Joined: Fri May 27, 2011 8:43 am

Re: Print, PDF, Email Button on Form

Postby ShopSite Lauren » Thu Jul 14, 2011 2:23 pm

You can write code for this. With print options, there are ways you can control what is printed. Can you provide more information on what you are trying to do (possibly a URL)? Are you taking information from the form, populating it in a PDF, then want that PDF printed?
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Re: Print, PDF, Email Button on Form

Postby dgroff » Mon Jul 18, 2011 6:27 am

URL: http://www.bakersgas.com/orderstatus/

The customer would enter a order # and zip code in the form. Once they push 'Search' the form generates a report regarding there order information. I want to be able to print just the order report or save the report as a pdf or insert the report content into a email.
dgroff
 
Posts: 28
Joined: Fri May 27, 2011 8:43 am

Re: Print, PDF, Email Button on Form

Postby BFChris » Mon Jul 18, 2011 7:40 am

This looks like Lexiconn's Order Status module, yes?

The FIRST part of your request (allowing the report to print just the order report without the surrounding page) should be an easy fix with CSS coding.

Inserting the report content in an e-mail should also be possible, with a bit more programming involved.

Creating a PDF is the most difficult because it would require separate software to create the PDF file.

~Chris
~~Barefoot Chris
--------------------------------
Barefoot Chris Web Design
www.barefootchris.net
--------------------------------
BFChris
 
Posts: 322
Joined: Mon Oct 09, 2006 3:28 pm
Location: PA

Re: Print, PDF, Email Button on Form

Postby dgroff » Mon Jul 18, 2011 8:05 am

Hi Chris,

Yes it is Lexiconn's Order status module.

Thanks for the suggestion. If I could just get print and email to work that would be amazing. I do not know how to program what you suggested. Any sites you could recommend that could show me on to do this?
dgroff
 
Posts: 28
Joined: Fri May 27, 2011 8:43 am

Re: Print, PDF, Email Button on Form

Postby BFChris » Mon Jul 18, 2011 9:38 am

Printing is easy. Look for CSS print stylesheets, such as the tutorial here:

http://www.alistapart.com/articles/goingtoprint/

The basic idea is that you add some CSS styles for printing only to the page's styles, adding "display:none" for any parts (headers, navigation, etc.) that aren't needed on the printed page.

Mailing is a bit trickier, but....

Lexiconn's module is a PHP/SQL based set-up.

So, with some additions to the page's PHP codebase, you can use the "mail()" function in PHP to send it.

http://www.w3schools.com/PHP/func_mail_mail.asp

~Chris
~~Barefoot Chris
--------------------------------
Barefoot Chris Web Design
www.barefootchris.net
--------------------------------
BFChris
 
Posts: 322
Joined: Mon Oct 09, 2006 3:28 pm
Location: PA

Re: Print, PDF, Email Button on Form

Postby BFChris » Mon Jul 18, 2011 9:55 am

A quick search turned up this interesting program/service:

http://pdfmyurl.com/

They let you turn any webpage into a PDF file. The business version (with a nominal cost) lets you set some preferences for how the PDF comes out and add a "PDF this webpage" button on the website.

~Chris
~~Barefoot Chris
--------------------------------
Barefoot Chris Web Design
www.barefootchris.net
--------------------------------
BFChris
 
Posts: 322
Joined: Mon Oct 09, 2006 3:28 pm
Location: PA

Re: Print, PDF, Email Button on Form

Postby dgroff » Tue Jul 19, 2011 7:41 am

I created a new CSS sheet and added it to the page:
<link rel="stylesheet" type="text/css" href="[-- VAR.LinkPath --]/style/main-default-vs3-print.css" media="print">
But it is not affecting the page at all when I go to Print.

Regarding emailing the form. I know how to set up the email to be sent when the user inputs all the information into a form and then clicks submit; the email would then send. But once the form is created I am not so sure how to go about putting that into a email. You mentioned using PHP. I am unfamiliar with PHP so I'll have to do some more reading.

And we would rather not pay for a software/company to generate PDFs so we might just pass on this.
dgroff
 
Posts: 28
Joined: Fri May 27, 2011 8:43 am

Re: Print, PDF, Email Button on Form

Postby BFChris » Tue Jul 19, 2011 8:31 am

When I view the CSS stylesheet in question, I see some strange code.

It doesn't look like a properly formatted stylesheet. I also only see one style in it and the style doesn't do anything to hide any elements.
~~Barefoot Chris
--------------------------------
Barefoot Chris Web Design
www.barefootchris.net
--------------------------------
BFChris
 
Posts: 322
Joined: Mon Oct 09, 2006 3:28 pm
Location: PA

Re: Print, PDF, Email Button on Form

Postby dgroff » Tue Jul 19, 2011 10:43 am

I was just playing around with the CSS sheet trying to learn. I ended up deleted everything mostly, thats why it doesnt look like much. I need to go back and work on it.
dgroff
 
Posts: 28
Joined: Fri May 27, 2011 8:43 am


Return to User Forum

Who is online

Users browsing this forum: No registered users and 39 guests