Page 1 of 1

Cancel

Posted: Fri Mar 28, 2014 12:16 pm
by rnott
I would like to add a Cancel button that will undo any changes the user has made since the last save and instantly take them to browse form.
I realize that I can click on breadcrumb, but It give message "Leave this form without saving".

Trying to give user a faster way to back out instead of having to click multiple times.
Thanks

Re: Cancel

Posted: Sun Mar 30, 2014 12:14 am
by massiws
rnott,
I think this is an extremely useful feature to avoid accidentally losing user's work, but if you want you can comment this two functions in index.php:
index.php.png
Max

Re: Cancel

Posted: Mon Jun 23, 2014 10:51 am
by Tinka
Max,

is it possible to disable these functions for a particular form only?

Tinka

Re: Cancel

Posted: Tue Jun 24, 2014 1:21 am
by admin
Tinka,

You could skip this warning by resetting edited..

Code: Select all

nuFORM.edited = 0;
or

Code: Select all

nuSetHash('edited', 0);
does the same thing.


Steven

Re: Cancel

Posted: Tue Jun 24, 2014 12:06 pm
by Tinka
Steven,

I tried this in the Javascript tab

Code: Select all

function nuOnSave() {
nuFORM.edited = 0;
return false; //don't want to save the record, save button is removed
}
It did not work.

But putting nuFORM.edited = 0; on the onblur event on every form object skips the alert so I went with this.

Tinka

Re: Cancel

Posted: Tue Jun 24, 2014 11:58 pm
by admin
.