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!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
nuPrompt() Insert into Field?
-
- nuBuilder Team
- Posts: 4565
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 529 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');