Validate a drop down box

N

Nolene

How do I create a validation to make sure someone has selected something
other than the default value in a drop-down box?

For example, I have a drop down that has the choices "Select ...", "Place
One", "Place Two". When the form opens the focus is on that field and the
value shown is Select... I want some sort of a pop-up or warning to appear if
the user tries to go to the next field without changing the Select... to one
of the other choices.

I've set Data Validation to: If this field is equal to "Select..." display a
dialog box that says "Please select Place One or Place Two", but when I test
it in preview mode nothing happens if I leave the field on "Select..." and go
on to the rest of the form. I've even tried setting up a Rule for basically
the same logic.
 
A

Andrew Watt [MVP - InfoPath]

How do I create a validation to make sure someone has selected something
other than the default value in a drop-down box?

For example, I have a drop down that has the choices "Select ...", "Place
One", "Place Two". When the form opens the focus is on that field and the
value shown is Select... I want some sort of a pop-up or warning to appear if
the user tries to go to the next field without changing the Select... to one
of the other choices.

I've set Data Validation to: If this field is equal to "Select..." display a
dialog box that says "Please select Place One or Place Two", but when I test
it in preview mode nothing happens if I leave the field on "Select..." and go
on to the rest of the form. I've even tried setting up a Rule for basically
the same logic.

If you supply a list of values set the value to be blank for the
"Select a choice" option and make that the default option.

All other options have a value and a display value.

On the Properties dialog set "Cannot be blank".

That should stop submission. There will be a red star displayed until
the user makes a choice.

Andrew Watt
MVP - InfoPath
 
N

Nolene

I have the red star, but that won't stop users from submitting the form
anyway. Is there any way to get a pop-up either when they leave the field or
when they try to print or email the form?
 
A

Andrew Watt [MVP - InfoPath]

Nolene,

If you have set the dropdown to "cannot be blank" there is something
wrong if users can submit and you set up the values for the dropdown
as I described.

Have you tried to submit when the no choice has been made? What
happens?

Andrew Watt
MVP - InfoPath
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top