[video] How to nuOnSave() for validating data to input
Posted: Sun Sep 17, 2017 8:48 pm
Hello,
I need to check before to save a record if a field is not empty; the data to input in the field is mandatory.
I have read many posts and I have tried to use the JavaScript code in the wiki: nuOnSave() http://wiki.nubuilder.net/nubuilderv3/i ... Save.28.29
As you may see in this video: https://youtu.be/cS39GtXKOPE the record is saved even if the code should have stop it.
I wonder if I'm missing something. What may be an alternative to do the same validation?
Thank you.
I need to check before to save a record if a field is not empty; the data to input in the field is mandatory.
I have read many posts and I have tried to use the JavaScript code in the wiki: nuOnSave() http://wiki.nubuilder.net/nubuilderv3/i ... Save.28.29
Code: Select all
function nuOnSave(){
var data = $('#title').val();
if(data != ""){
return false;
}else{
return true;
}
}
I wonder if I'm missing something. What may be an alternative to do the same validation?
Thank you.