Manage Learn to apply best practices and optimize your operations.

Required Fields

in IE, you can't save this form without filling in the required fields.

In form
HTML TAGS
class = required
title = description of field

Call:
OnSumbit:
return validatefields(document._FORMNAME);

there will be a box to confirm submit, or a one with the field descriptions
which are required
function validatefields(TheForm)
{

var msg = "";
var EmptyFields = "";

PossibleError = new Object();
var NoError = "";
var x = 0;

for (var i = 0; i < TheForm.length; i++)
{
var e = TheForm.elements[i];
if ( e.className.indexOf("required") != -1 )
{
if (((e.type == "text" || e.type == "textarea") &&
(e.value == null || e.value == "")) ||
(e.type == "select-multiple" && e.selectedindex == -1) ||
(e.type == "select-one" && e.selectedindex == 0) ||
((e.type == "radio" || e.type == "checkbox") && (e.checked == false)))
{
EmptyFields += "\n " + e.title;
PossibleError[x++] = e.title;
continue;
}
else
{
NoError += e.title;
}
}
}

if (!EmptyFields)
{
if (confirm("Save this form?"))
{
TheForm.submit()
}
}
else
{
msg = EmptyFields + "\n\n";
alert(msg);
return false;
}
}

Dig Deeper on Lotus Notes Domino User Settings

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close