Rename Master Detail Add Link

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
apis
User
Posts: 124

Rename Master Detail Add Link

Post by apis »

I have a mater detail link in the list page to add new records " Add Cash Register/Bill" and i need to change this link to a name " New Bill".
would appreciate any help to do so.
The other thing is would there be a simple possibility to prompt print dialog box after adding a new record?


mobhar
User
Posts: 11723

Post by mobhar »

apis wrote:
i need to change this link to a name " New Bill".

Simply put the following code in "Startup Script" under "Client Scripts" -> "Table-Specific" -> "List Page":

$(document).ready(function() {
$('.ewDetailAdd ').html('New Bill');
});


apis
User
Posts: 124

Post by apis »

Thank you.

would there be a simple possibility to prompt print dialog box after adding a new record?


vincenthung
User
Posts: 88

Post by vincenthung »

In Startup Script add "window.print();" to prompt the print dialog.

You can add a session variable in "Row_Inserted" Server Event to identify a record is added, then in Startup Script check this session variable and print the code.

For example:
<?php if (<Condition>) { ?>
window.print();
<?php } ?>


beyond
User
Posts: 6

Post by beyond »

mobhar wrote:

Simply put the following code in "Startup Script" under "Client Scripts" -> "Table-Specific" -> "List Page":

$(document).ready(function() {
$('.ewDetailAdd ').html('New Bill');
});

I use v2019, but no change. still shown Addmastername/detailname.
have change ewDetailAdd to DetailAdd but same condition.


Post Reply