I use appgine for my website www.arbeidsdeskundige.nl
Is it possible to show the print detail preview page directly when you select an item? And go back to the main page from there?
I would like to let the visitors come on the print detail page in one step
Visitors don't need te see the detail form
I 'll use the detail form only to fill the database with new partners
How to show print detail page directly
Re: How to show print detail page directly
I use a wrong internet adres:
Helmonder wrote:I use appgine for my website http://www.arbeidsdeskundigenodig.nl
Is it possible to show the print detail preview page directly when you select an item? And go back to the main page from there?
I would like to let the visitors come on the print detail page in one step
Visitors don't need te see the detail form
I 'll use the detail form only to fill the database with new partners
Re: How to show print detail page directly
It's doable if you're willing to edit some code ... you should use the tablename_init() hook to change to a new table view template that links directly to the printable detail view in case the current user is not signed in ...
You'll also need to create that new table view template ... You can start with the original template at "templates/tablename_templateTV.html" (where tablename is the name of the concerned table) and replace the <%%SELECT%%> placeholder with:
and the <%%ENDSELECT%%> placeholder with:
I assumed in the above code that your table's primary key field is named id ... You should change it in the above code if it's different.
Code: Select all
$options->Template
You'll also need to create that new table view template ... You can start with the original template at "templates/tablename_templateTV.html" (where tablename is the name of the concerned table) and replace the <%%SELECT%%> placeholder with:
Code: Select all
<a href="tablename_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1">
Code: Select all
</a>
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: How to show print detail page directly
I tried following your instructions Ahmad, but could not get this to work. I’ll illustrate what I did with “TableAâ€. I want to print the detail view (via TableA_templateDVP.html) when I click on the table view record.
In TableA.php in the Hooks directory, I changed:
to
I changed the template, TableA_template_TV.html using the original TableA_templateTV.html as a guide.
I replaced placeholder with and changed the placeholder with
(all occurrences – see below)
When I try to open TableA in the browser, I get a blank screen. Where did I go wrong?
In TableA.php in the Hooks directory, I changed:
Code: Select all
function TableA_init(&$options, $memberInfo, &$args){
return TRUE;
Code: Select all
function TableA_init(&$options->Template, $memberInfo, &$args){
return TRUE;
I replaced
Code: Select all
<%%SELECT%%>
Code: Select all
<a href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1">
Code: Select all
<%%ENDSELECT%%>
Code: Select all
</a>
Code: Select all
<td id="TableA-ResidentID-<%%VALUE(ResidentID)%%>" valign="top" class="TableA-ResidentID TableBodyNumeric"><a href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(ResidentID)%%></a></td>
<td id="TableA-LastName-<%%VALUE(ResidentID)%%>" valign="top" class="TableA-LastName TableBody"><a href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(LastName)%%></a></td>
<td id="TableA-FirstNames-<%%VALUE(ResidentID)%%>" valign="top" class="TableA-FirstNames TableBody"><a href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(FirstNames)%%></a></td>
Re: How to show print detail page directly
Hi Guys. I might have made my question difficult/impossible to follow with the formatting here in my last question. I do need help.
I tried following the instructions to display the detail print view directly from the table view, but could not get it to work. I’ll illustrate what I did with “TableAâ€. I want to print the detail view (via TableA_templateDVP.html) when I click on the record in the table view..
In TableA.php in the Hooks directory, I changed:
function TableA_init(&$options, $memberInfo, &$args){
return TRUE;
to
function TableA_init(&$options->Template, $memberInfo, &$args){
return TRUE;
I changed the template, TableA_template_TV.html using the original TableA_templateTV.html as a guide.
I changed:
<td id="ResidentsOwners-ResidentID-<%%VALUE(ResidentID)%%>" valign="top"
class="ResidentsOwners-ResidentID
TableBodyNumeric"><%%SELECT%%><%%VALUE(ResidentID)%%><%%ENDSELECT%%></td>
<td id="TableA-LastName-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-LastName
TableBody"><%%SELECT%%><%%VALUE(LastName)%%><%%ENDSELECT%%></td>
<td id="TableA-FirstNames-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-FirstNames
TableBody"><%%SELECT%%><%%VALUE(FirstNames)%%><%%ENDSELECT%%></td>
to
<td id="TableA-ResidentID-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-ResidentID TableBodyNumeric"><a
href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(ResidentID)%%></a></td>
<td id="TableA-LastName-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-LastName TableBody"><a
href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(LastName)%%></a></td>
<td id="TableA-FirstNames-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-FirstNames TableBody"><a
href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(FirstNames)%%></a></td>
MY RESULTS
When I click on a record in the Table View, I get a blank HTML document. If I leave the ->Template change out of TableA.php, I get the detail print view, but with no values in it. Also, I can't get to the detail view, which users with edit permission will need to get to.
Any help would be appreciated. I tried to follow Ahmad's instructions, but obviously did something wrong.
Thanks,
Mike
I tried following the instructions to display the detail print view directly from the table view, but could not get it to work. I’ll illustrate what I did with “TableAâ€. I want to print the detail view (via TableA_templateDVP.html) when I click on the record in the table view..
In TableA.php in the Hooks directory, I changed:
function TableA_init(&$options, $memberInfo, &$args){
return TRUE;
to
function TableA_init(&$options->Template, $memberInfo, &$args){
return TRUE;
I changed the template, TableA_template_TV.html using the original TableA_templateTV.html as a guide.
I changed:
<td id="ResidentsOwners-ResidentID-<%%VALUE(ResidentID)%%>" valign="top"
class="ResidentsOwners-ResidentID
TableBodyNumeric"><%%SELECT%%><%%VALUE(ResidentID)%%><%%ENDSELECT%%></td>
<td id="TableA-LastName-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-LastName
TableBody"><%%SELECT%%><%%VALUE(LastName)%%><%%ENDSELECT%%></td>
<td id="TableA-FirstNames-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-FirstNames
TableBody"><%%SELECT%%><%%VALUE(FirstNames)%%><%%ENDSELECT%%></td>
to
<td id="TableA-ResidentID-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-ResidentID TableBodyNumeric"><a
href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(ResidentID)%%></a></td>
<td id="TableA-LastName-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-LastName TableBody"><a
href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(LastName)%%></a></td>
<td id="TableA-FirstNames-<%%VALUE(ResidentID)%%>" valign="top"
class="TableA-FirstNames TableBody"><a
href="TableA_view.php?SelectedID=<%%VALUE(id)%%>&dvprint_x=1"><%%VALUE(FirstNames)%%></a></td>
MY RESULTS
When I click on a record in the Table View, I get a blank HTML document. If I leave the ->Template change out of TableA.php, I get the detail print view, but with no values in it. Also, I can't get to the detail view, which users with edit permission will need to get to.
Any help would be appreciated. I tried to follow Ahmad's instructions, but obviously did something wrong.
Thanks,
Mike