This topic is locked

Print single record from a grid using a print icon link

2/12/2024 1:05:27 AM
PHPRunner Tips and Tricks
1NET author

img alt

I've created an option to print a single record from a grid (instead of the whole grid of records listed)
This icon will print load a print page in a new window

Step-1
Format your print page in Designer to look like a single record layout

img alt

Step-2
Move your ID field next to the Edit & View Icons

img alt

Select the ID field and choose "View as Custom"

$value = "<a href='line_boring_print.php?a=print&selection[0]=$data[lb_id]' target='_new'><i class='fa fa-print fa-lg'></i></a>"

Change the following to suit your project page

$value = "<a href='YOUR_PAGE_print.php?a=print&selection[0]=$data[YOUR_GRID_RECORD_ID_FIELD]' target='_new'><i class='fa fa-print fa-lg'></i></a>"

it used the icons in the Font Awesome library already installed in your project.
For more configurations of the icons look at Font Awesome Examples

Dalkeith 2/12/2024

Thank you 1NET I could well see me using that at some point in the future