Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Consider a drop down "Duration" which has 3 options

1. 30 days
2. 60 days
3. 90 days

and by default 30 days will be the selected value. Does it make sense to make this dropdown mandatory? Do we really need to put a * (Mandatory mark) for this field?

share|improve this question
2  
This question would also fit here: ui.stackexchange.com –  LennyProgrammers Dec 7 '10 at 10:05
    
@Lenny222 Is it possible to migrate this? Or Do I need to delete this and open a new question over there? –  Tech Jerk Dec 7 '10 at 13:04
    
I don't know, sorry. –  LennyProgrammers Dec 7 '10 at 13:21

7 Answers 7

up vote 7 down vote accepted

No it does not make sense. The only context in which it could be argued to make sense is if there was a blank selection present. But having a blank selection be available for a required field with a default value doesn't make any sense.

If there were no default value, then one would want a blank field and required status. As it stands, I think that that would only add confusion.

share|improve this answer

If * only means "mandatory" then it does not make sense, as you do not need to change the value to get the form to submit.

Some users might assume that if they don't add something to a form, it won't be posted on form submission. A * might then be a way of drawing their eye to an important field that will be posted on form submission, even though no action is technically required for the form to submit. In that way a * is more of a "this field will affect submission " marker than a "this field is mandatory " marker.

share|improve this answer

Depends on the importance of the field and not on the default value. Do you think if this field is not mandatory will give the user shock after 30 days? If yes then it should be mandatory or else it should not. My strategy is to keep minimum fields mandatory and some sufficient default value for others. Then mention in the documentation what each value does, and if something happens which value to change.

share|improve this answer

In general, it doesn't make sense, unless:

  1. It is possible to reject the default value, and return an empty value instead.

  2. Adding the mandatory mark has security or other benefits.

For example, in ASP.Net, making a field mandatory using a validator makes the field mandatory on both the client and the server. As well as providing client-side feedback if the mandatory field is not completed (not useful in your case), it also provides a measure of security on the server. The idea is that the server must reject a submission where the mandatory field has not been populated. Although this shouldn't happen if you provide a default value, it isn't impossible. Indeed, it can occur when:

  1. The use has deliberately altered the client-side code to send invalid data back to the server
  2. The user's session has been meliciously compromised by a 3rd party (virus etc)
  3. There is a client-side programming error

In these three cases, the server-side validator will ensure that the empty field will not be processed.

share|improve this answer
    
This really is a coder point of view. From user perspective, it really does not make sense. –  David Dec 7 '10 at 13:21
    
@David: You're right, of course. The OP didn't specify a perspective, and I wanted to cover something that can be important, but that wasn't discussed in other replies. –  Kramii Dec 7 '10 at 15:43
    
Sure, but it doesn't sound good to add something to the user interface that is irrelevant to the user only to have some advantage on server side. –  David Dec 8 '10 at 7:45
    
@David: Point taken. In the ASP.Net example, however, that is how Microsoft designed things. –  Kramii Dec 8 '10 at 9:00

Generally, probably not. But if you absolutely want the user to make conscious selection, you can add something like <select one> as the first option in the list and treat it as mandatory in the form's validation.

share|improve this answer

The two are different, but consider this, your application might require a value to be entered. However, can you guaranteee that all other applications/dba work that might connect and update to the same database will do the same. if not how would your application handle the exception.

In such cases make it mandatory at the database level to ensure consistancy and save you the headache of working out why some items cause an issue when other don't and you've only got the application front end to look at. Because another process hasn't applied the same criteria.

share|improve this answer

From a code point of view no.

From a UI point of view (which is how your question is phrased) I'd say yes.

The reason I say this is that although it's specified, many people read "mandatory" as "significant" (how many people skim web forms only filling in the smallest amount of data?).

If the specific value in the field is important you may wish to use the mandatory * to show that it shouldn't just be skimmed over but that the user should give it some consideration.

Plus for pedants (and we're all computer programmers so that should be most of us) surely we should be saying it IS mandatory so should be marked as such, regardless of the UI component being used.

This may also protect you from the change down the line when someone says "let them pick any value and replaces it with a text box".

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.