Stop saving after a check in before save

Stop saving after a check in before save

Postby alextouch » Thu Jul 17, 2014 12:13 am

Hi

I need to do this:
After I have compiled an edit form, I want to do a check into the database on another table to see if there is a correspondence between data. If yes, the program must save, otherwise it must display an alert and avoid saving.

So it's possible to stop nuBuilder from saving data after a check in Custom Code/Before Save, like "return false" in Javascript?

Thank you
Alex
alextouch
 
Posts: 27
Joined: Tue Jun 05, 2012 10:10 pm
Location: Bologna, Italy

Re: Stop saving after a check in before save

Postby admin » Wed Jul 23, 2014 4:28 pm

Alex,

If you attach a message to a variable named $errorMessage in the Before Save event, this message will not continue to save but return its self as a warning.

If $errorMessage remains empty a record will be saved.

Steven
admin
Site Admin
 
Posts: 3139
Joined: Mon Jun 15, 2009 9:53 am

Re: Stop saving after a check in before save

Postby alextouch » Tue Aug 19, 2014 7:15 pm

Steven

Thank you for your answer.
I did the job with ajax, so that I can check correspondence directly from javascript.

Alex
alextouch
 
Posts: 27
Joined: Tue Jun 05, 2012 10:10 pm
Location: Bologna, Italy


Return to General