This topic is locked

Custom Form

3/27/2012 6:47:37 PM
PHPRunner General questions
K
KennyB author

I was playing with php 6.1 and have not used phprunner in a while. I have the View and Edit screens and would liek to add a button that will pring me to print a Form (like a receipt or invoice etc)
I thought I could create a Table view and then filter for the record I would like.

Now modify a form that then can be printed.

  1. In order to have a View it looks like I can only get if I select LIST from the features I would like to add (List,add,edit,delete etc)
  2. Code to actually print the form to paper or PDF.. I guess I would add a custom button and put some code behind to print what is shown on the Web page.
    Any help or direction would be appreciated.
    Thanks

Sergey Kornilov admin 3/27/2012

Since links to View pages only appear on the List page you need to enable List page as well.
To print a page add a button and use something like this in ClientBefore event:

window.print();


More info:

http://www.javascriptkit.com/howto/newtech2.shtml

K
KennyB author 3/28/2012



Since links to View pages only appear on the List page you need to enable List page as well.
To print a page add a button and use something like this in ClientBefore event:

window.print();


More info:

http://www.javascriptkit.com/howto/newtech2.shtml


Is there a way to Hide the button that I add prior to the window.print so it does not show up on the printout. Also guess would reply to the other buttons like BACK TO LIST.. etc

Sergey Kornilov admin 3/28/2012

You can definitely do that though a bit of custom coding will be required.
You can use jQuery that provides hide() function for this purpose:

http://api.jquery.com/hide/