This topic is locked

Create a new button

6/23/2010 4:03:41 PM
PHPRunner General questions
M
marthins author

Hello,
I have create two buttons:

  1. one button in the List page to change a field value of the table and reload the page;
  2. the second should be created in the Add page - after save a new record I want to be redirected to the edit page of this record and see the fields saved.
    I tried several ways but didnt work for me. Can anybody help me?
    Anselmo

M
marthins author 6/23/2010

Sorry, I didnt mentioned on the post but this should be created on PHPRunner.
Regards
Anselmo

A
ann 6/24/2010

Anselmo,
Create button manually in the HTML mode on the Visual Editor tab:

<INPUT class=button id=submit2 type=submit value="Save and edit" name=submit2>



Then proceed to the After record added event on the Events tab:

if ($_REQUEST["submit2"]=="Save and edit")

{

header("Location: TableName_edit.php?editid1=".$keys["Id"]);

exit();

}



replace TableName with your table name and Id with your id field name.
Could you clarify what do you want to edit on the List page: one field or one record, selected one or do you want to add button on each row?