This topic is locked

Check box required?

12/5/2008 9:23:35 AM
ASPRunnerPro General questions
G
grinningdog author

Can I have a check box as a required field?
In version 5.1 (build 327) I can't see this as an option in Visual Editor. Can I do it some other way?

J
Jane 12/8/2008

Hi,
if you set up checkbox field as required you should mark this field as checked and can't uncheck it.

In general you can verify entered values in the Before record added/updated events on the Events tab and print error message if needed.

S
senake 12/20/2008

Hi Jane,
Is there any chance you could provide the code snippet to do this? I tried one that was supposed to work, but it just errored.
Thanks
Sen

Hi,

if you set up checkbox field as required you should mark this field as checked and can't uncheck it.

In general you can verify entered values in the Before record added/updated events on the Events tab and print error message if needed.

J
Jane 12/22/2008

Hi,
all entered values are in the dict collection, I.e. dict("FieldName1"), dict("FieldName2"), etc.

Here is a sample:

if dict("FieldName")=0 then

response.write "error message"

BeforeEdit = False

else

BeforeEdit = True

end if