Go directly to add detail after master record

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

Go directly to add detail after master record

Post by vicmontol »

Hey friends, I got a simple question that I expect you give me some clues.

I have 'clients' table and 'orders' table for these clients.
With the default 'master/detail' table option i get the default behavior:
I add a client 'clientadd.php', after add it redirects to 'clientlist.php' and from this page i got a link to order details 'orderlist.php' to add an order for this client in 'orderadd.php'

I'd like to go directly from add client 'clientadd.php' to the order add page 'orderadd.php'

I think I did it before in older version but i cannot remember how I did (maybe coding somewhere?).
In clients' table I have the 'Return Pages -> After add' option but I can't select Add Page from orders.

Thank you for any response.


danielc
User
Posts: 1601

Post by danielc »

You can use Page_Redirecting server event at Add/Copy Page for your master table to redirect to your detail page:
$url = "your URL";

But you can setup {Add master/detail} link (instead of {Add} link) so you do not need to jump to detail add page after master add page.


Webmaster
User
Posts: 9430

Post by Webmaster »

Note that you can enter your own Return Page, not only select from the list. Read Table Setup -> Return Pages in the help file.


Post Reply