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.