Michael Gaigg: Über UI/UX Design

11Aug0

How to mark optional Form Fields?

Posted by Michael Gaigg

Mark Mandatory or Optional fields?

This is a question that seems to re-surface every year or so. Should we mark mandatory fields or optional fields? And how?

Examples

Here are 2 examples:

Version 1

Version 1

Version 2

Version 2

Version 1 marks optional fields (with the language 'optional') and Version 2 marks mandatory fields (with an asterisk).

Solution

Version 1 is the clear winner. While in the past it might have been a common practice to mark mandatory fields we now know that users generally tend to assume that a form field presented to them needs to be filled out (i.e. is mandatory). Therefore we don't need to mark them as mandatory but instead let the user know that a field does not to be filled out (i.e. is optional).

The only exception to this rule is if the majority of form fields are optional; in this case it's ok to reverse the rule but to me this also bears the question if the form could be improved. Why would all these optional fields need to be presented to the user? Can we get away without them? Or progressively disclose them?

One more hint, the word "optional" works really well, definitely better than an asterisk that needs to be explained somewhere (actually missing in our Version 2 above), and still be ambiguous at first.

2Aug0

Silverlight Form Submission using the Enter Key

Posted by Michael Gaigg

Sounds ridiculously simple but still I need to look it up over and over again.

So here it is, documented once and forever: How to catch the Enter key (to trigger a search form submission for example).

XAML:

<TextBox x:Name="txtInputField" KeyUp="txtInputField_KeyUp" />

Code-behind (C#):

private void txtInputField_KeyUp(object sender, KeyEventArgs e)
{
   if ((e.Key == Key.Enter) && (txtInputField.Text.Length > 3)) // feel free to remove the length limit
   {
      // submit form or whatever you want to do
      this.SubmitForm();
   }
}

Note: I've added a clause so that the form is only submitted when the user has typed a minimum of 3 characters which makes sense when hitting a service for example. Feel free to remove that.

23Apr0

Highlights of Week 16/2011

Posted by Michael Gaigg

18Mar0

Highlights of Week 11/2011

Posted by Michael Gaigg

Thanks to everybody that sent me link suggestions. Here the highlights for week 11/2011: