Enforcing stamp input, Text field validation, and a few other questions about text fields
Hi,
My stamp has 6 text fields: name, date, project (optional), submittal number (optional), scope, notes. When the stamp is placed the user dialog appears with both the name and date already populated. Project and submittal num are optional, so I need to require the user enter text in either Scope or Notes.
My goal is to:
--Prevent the stamp from being placed if no data was entered in the dialog. So if the user did not enter text in Scope or Note, yet click the Ok button, they're alerted and the dialog box reappears so the user can completely fill out the dialog.
Also, I'd like to
--Hide the optional fields on the stamp if no data was input by the user.
--Allow the Notes text to be copied and pasted after creating the stamp (so we can reuse the note text) --but not editable on the stamp--.
I placed the below in the script before the getField statements, but it doesn't work. Can you help?
function checkText()
{
var showText1 = document.getElementById("sco1").value;
{
if(showText1.value ="")
alert('please enter text into sco1');
alert('my message...');
}
}
