I would like to know when a record is being saved if it was changed or not. If it was changed, then some code will execute under After Save, otherwise the code can be skipped.
I cannot seem to find it now, but I thought I had seen a variable somewhere that is set on the edit form when any data in the form was changed. Was I dreaming?
Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Detecting when edit form has changed...
-
- Posts: 23
- Joined: Tue May 08, 2012 8:24 pm
Re: Detecting when edit form has changed...
Is there any documentation on using beenedited? I've not been able to find any.
-
- Posts: 15
- Joined: Wed Sep 05, 2012 5:15 am
Re: Detecting when edit form has changed...
This does not seem to be working for me. In my After Save code I want to send an email if the record was modified. When the check of #beenedited# did not work, I removed the check and added it to the body of the email so I could see the value easily. It is always '0' whether anything was changed or not. Any ideas?
Re: Detecting when edit form has changed...
mlgeek,
There is no documentation as it was just to be used by nuBuilder its self.
parkerjnc,
You'll need to create a hack by putting some JavaScript on the form you want to check..
Then you can use #has_changed#
Steven
There is no documentation as it was just to be used by nuBuilder its self.
parkerjnc,
You'll need to create a hack by putting some JavaScript on the form you want to check..
Code: Select all
$(document).ready(function () {
e = document.createElement('input'); //-- create a hidden input
e.setAttribute('id','has_changed');
e.setAttribute('name','has_changed');
$('#theform').append(e);
$('#' + e.id).css( 'visibility', 'hidden');
$("select,textarea,input").change(function () {
$('#has_changed').val(1);
});
});
Then you can use #has_changed#
Steven
-
- Posts: 15
- Joined: Wed Sep 05, 2012 5:15 am