views:

75

answers:

2

I currently have an advanced search page that searches a number of fields in my database. It has several textboxes that all search different fields, the user has the option to leave textboxes blank and they will be ignored from the search.

The problem is I now want to add to this to also search some of my BIT fields, my original idea was to use checkboxes for this. the problem I have is that I now realise I need 3 states N/A, True, False as the user needs the ability not to search on this field. The only real idea I have is something like a dropdown or radio list with these 3 options in. However there could end up being 5+ inputs searching BIT fields and I'm not sure if this would get messy. I remember when I used to develop windows apps a checkbox could also have a null/not selected state I'm not sure if there is any alternative for the web? I didn't really want to have to right a custom control if anything exists?

I just wondered if anyone had any suggestions as to how they would design this.

Thanks

A: 

Checkbox in the web world only have 2 state : check or unchecked

you could do like in reporting services where you have a checkbox to indicate if the field is used in the search next to radio for yes and no, but this would get messy.

I would go with a dropdown with All, Yes and No options. with All being the default option.

freddoo
A: 

You could potentially do it with two radio buttons per option (yes/true and no/false) with neither selected by default - this would allow a user to leave them blank and ignore them, or select one of the options.

The only real issue with this is how to reset them back to nothing once the user's selected one - which would either need a "Clear all" button, which would reset all the choices, or you're back to a list with three options - either a radio or drop-down.

Zhaph - Ben Duguid