Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Select2 ignoring NoBlanks
-
- Posts: 21
- Joined: Thu Feb 18, 2021 5:56 pm
Select2 ignoring NoBlanks
A Select2 Field doenst triggers the NoBlanks Validation.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Select2 ignoring NoBlanks
Hi,
The "cannot be left blank" even doesn't appear when not using select2. This looks like a bug (but just if "multiple" is ticked)
In the meantime, you could add some JavaScript in the form's Custom Code to check for no blanks.
The "cannot be left blank" even doesn't appear when not using select2. This looks like a bug (but just if "multiple" is ticked)
In the meantime, you could add some JavaScript in the form's Custom Code to check for no blanks.
Code: Select all
function nuBeforeSave(){
if( $('#fuer_unternehmen_id').val().length == 0 ){ // <<--- Replace with your Object ID !
nuMessage(['<b>für Unternehmen</b> ' + nuTranslate('cannot be left blank')]);
// Cancel saving
return false;
}
// Continue Saving
return true;
}