This topic is locked
[SOLVED]

 'Save' button...

1/26/2009 2:54:14 PM
PHPRunner General questions
I
indigo author
  1. Can we split the Save button to: "Save and Continue", "Save and Exit"
  2. How do i disable the save button once pressed, so duplicate entries are avoided.

J
Jane 1/27/2009

Hi,
please see my answers below:

  1. http://www.asprunner.com/forums/index.php?showtopic=10748
  2. Just redirect to the view or edit page in the After record added events on the Event tab.

B
BillyBobRob 1/27/2009

I followed the procedure in your link by adding in the visual editor of the add page, right after the save button line the following code

{BEGIN save_button2}<SPAN class=buttonborder><INPUT class=button id=submit2 type=submit value="Save and back to whorl" name=submit2></SPAN>{END save_button2}&nbsp;


I then added the following in the After record added events page

if ($_REQUEST["submit2"]=="Save and back to whorl")

{

header("Location: Whorl_list.php");

exit();

}


There is however a problem. The new button doesn't appear on the add page. When looking at the Branch_add.htm code in the template directory, the code for the new button is there. However, when looking at the source code for the page in the browser, the code for the new button isn't there ! Am I missing something. I have PhpRunner 5.0 (build 447).
Thanks.
Rob

J
Jane 1/28/2009

Hi,
do not add {BEGIN save_button2} and {END save_button2} around your button.

B
BillyBobRob 1/28/2009

It works... almost. When I go back to the other table by pressing the new button, the master table information in the upper left corner is not displayed. It is there however when the page is displayed by going back using the Back to master table link (after a regular save). How would one get the master information and link displayed again ?
Rob

J
Jane 1/29/2009

Rob,
use this code:

if ($_REQUEST["submit2"]=="Save and back to whorl")

{

header("Location: Whorl_list.php?a=return");

exit();

}

B
BillyBobRob 1/29/2009

Jane,
Thanks once again for the valuable help. You guys really give an excellent custumer service ! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=37264&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />
Rob

I
indigo author 1/30/2009

that works great...
how do I disable the button once pressed...?

J
Jane 1/30/2009

Hi,
what button do you want to hide?

Save and back to whorl

button redirect to the list page.