Hello,
I need a little help to develop little alert when someone save new record because I want that user will be sure to clone the object before subscribe the new record.
I see that many user when add multiple record don't pay attention to clone the last record before start edit new one.
Someone can help me?
Many thanks
Regards
ANdrea
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Alert Message When you save
-
- Site Admin
- Posts: 2791
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 4 times
Re: Alert Message When you save
Andrea,
Are you saying that noone can edit an old record, they can only edit a cloned record?
Steven
Are you saying that noone can edit an old record, they can only edit a cloned record?
Steven
-
- Posts: 4
- Joined: Thu Dec 27, 2012 3:50 pm
Re: Alert Message When you save
NO no,
problem was about clone procedure.
When user want to clone a record can happened that he don't clicl clone and so edit the old field,
I can show an alert when someone clic save with write "are you sure to have clone?".
Thanks for hlep
problem was about clone procedure.
When user want to clone a record can happened that he don't clicl clone and so edit the old field,
I can show an alert when someone clic save with write "are you sure to have clone?".
Thanks for hlep
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: Alert Message When you save
Andrea,
you can use nuBeforeClone() function in Javascript tab to capture the clone event and do something; there could be more ways.
1st way (a simple workaround solution):
- create a text object on the form (better readonly) that informs users if that is a new/cloned record or a modified record: - insert this SQL in Default value SQL object field
Text is displayed only when a new record is inserted or an existing record is cloned.
2nd way:
- insert this code in Javascript tab:
so the user have to confirm the clone procedure before he start to modify something.
3th way.
If you want to be sure and alert on saving record you might (I never tryed this):
- create a text object as explained above (you may use also an hidden field);
- in nuBeforeSave() function check the value of the object and ask user to confirm.
Hope this helps,
Max
you can use nuBeforeClone() function in Javascript tab to capture the clone event and do something; there could be more ways.
1st way (a simple workaround solution):
- create a text object on the form (better readonly) that informs users if that is a new/cloned record or a modified record: - insert this SQL in Default value SQL object field
Code: Select all
SELECT 'This is a new record!'
2nd way:
- insert this code in Javascript tab:
Code: Select all
function nuBeforeClone() {
return confirm('Are you sure to clone this record?');
}
3th way.
If you want to be sure and alert on saving record you might (I never tryed this):
- create a text object as explained above (you may use also an hidden field);
- in nuBeforeSave() function check the value of the object and ask user to confirm.
Hope this helps,
Max
-
- Posts: 23
- Joined: Tue May 08, 2012 8:24 pm
Re: Alert Message When you save
Max, you're awesome. I learn a lot from how you participate on these forums and wanted to take a moment to say thank you.
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: Alert Message When you save
I learn a lot participating on these forums too! That's the community!mlgeek wrote:Max, you're awesome. I learn a lot from how you participate on these forums and wanted to take a moment to say thank you.
I'm glad to know this is appreciated,
thanks.