Gossamer Forum
Home : Products : DBMan : Customization :

How to make fields selectively required?

Quote Reply
How to make fields selectively required?
How can I make certain fields required if a certain other field is filled in but
*not* required if the certain other field is *not* filled in?
Quote Reply
Re: [Neila] How to make fields selectively required? In reply to
You have to use javascript to do that! inn your html

like:

<script>

function dataCheck(form) {
if (form.first_name.value=="") {
alert ("Please enter your first name.")
return (false)
}


</script>

put the code between the <head> tags </head>
and make a form with fields and use the same code as above to validate entries!

first_name is a field for example, see below:

<input NAME="first_name" TYPE="text" SIZE="20" MAXLENGTH="40">


good luck!
KevinW ANDRE
webmaster@cyberbrickell.com
Quote Reply
Re: [Neila] How to make fields selectively required? In reply to
I don't have a specific thread reference to quote, but if you search on "required" in either the DBMan forums or the FAQ noted below, I know a solution has been posted.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/