Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Sample events > Appearance

Add a new Save button to Add/Edit pages

Scroll Prev Next More


Lets say we need to add a new Save to the Add or Edit page that saves the record and redirects the user back to the List page.



1. Add a new button to the Add or Edit page via Insert button function in Page Designer.


2. Add the following code to the ClientBefore event of the button:


pageObj.on('beforeSave', function(formObj, fieldControlsArr, pageObj){
 formObj.baseParams['golist'] = "1";
return false;


3. Add the following code to the AfterAdd event of the Add page or AfterEdit event of the Edit page:


 header("Location: ..._list.php");

See also:

Tri-part events

RunnerPage object

Insert Standard button. Add page

Insert Standard button. Edit page

Troubleshooting custom buttons

Insert custom button

How to enable/disable a button

Button object


Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software