Gossamer Forum
Home : Products : DBMan : Customization :

non required field needs to be required

Quote Reply
non required field needs to be required
Hi All,

I have another question. I need to know if you can 'make' an non required field required. For example, if the user selects a value, and another field (that is not required) needs to have data entered into it. Can this be done?

Thanks--
Quote Reply
Re: [dawg821] non required field needs to be required In reply to
Two places to look (for two different answers):

1. http://javascript.internet.com (for javascript solution - look under "Forms" for a dynamic on-the-fly type of validation)

2. http://redundantcartridge.com/dbman/ (for dbman solution - look under "forms" and perhaps "admin" for a cause-and-effect type of solution)

The dbman route would most likely involve adding something to the "sub validate_record" in db.cgi such as:

if (($in{'Field1'}) && (!($in{'Field2))) {return some kind of error}

How to do this? I don't know. Poke around in the sub validate_record and see if you spot a good place to add the above statement. I'd personally opt for the JavaScript method.

.