I was doing a code review for a bug fix, which was actually a new feature. The requirement was to supply a way of restoring the default value of certain URL that was displayed in a text box on a web page.
The previous behavior was that once the URL was modified, user had no way to restore it. It looked like this:

The solution that was suggested by the bug creator was to use two radio buttons, one with the text "Default Value", and the other "Custom Value". When you clicked the "Custom Value" radio button, the URL in the text box was remembered as custom URL. When you clicked the "Default Value" radio button, the default URL will be restored. It looked like this:

Initially I felt there was something uncomfortable about the solution, but I could not really pin point what's wrong.
After some discussion, I realized what it was. I could not think of any tools I used that provide overriding/restoring default value by using radio buttons.
Then I came up with the idea of using one check box below the original text box, and supply a second text box next to the check box. When the check box was selected, the URL supplied in the new text box that is next to it would be used as the custom value. The original text box kept the default value displayed. It looked like this:

and this:

I reckon this solution is better than the typical "Restore Default" button, which you will find on the two most popular browsers' Tools | Options | Home Page setting.
Print | posted on Saturday, September 15, 2007 11:39 PM