Fantastic! Working now as hoped.
The only other question i have, is there a way to make sure tex is written in the nuPrompt box, so it can't be left blank?
No worries if not.
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.
nuPrompt() Insert into Field?
-
- nuBuilder Team
- Posts: 4305
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: nuPrompt() Insert into Field?
Check if the value is blank and show nuPrompt again.
Code: Select all
function nuOnPromptClose(val, ok) {
if (ok) {
if (val.trim() == '') {
nuMessage('***someting*** cannot be left blank')
setTimeout(function(){ nuPrompt('someting', 'caption'); }, 200);
}
nuSetValue('mpd_reason', val);
nuDisable('mpd_status')
} else {
nuSetValue('mpd_status', status);
}
}
nuPrompt('someting', 'caption');