All the versions of this article: [English] [français]
Le 12/5/2010, 14:44 Nice style for forced form fields
During my development phase, I created a nice style to show "forced text fields" in web forms. Those text input fields used when part of the field content is locked.
How does it work and how does it looks like ?...
Ugly usual text fields
When surfing the web, we often fill forms, text areas, check boxes etc. This is even our main usage of the Web : when you search something using a search engine, or when you send an email using a webmail, you are filling forms and fields ...
Sometimes, you only have to put the beginning or the end of the form field value
e.g.: I want to create an email address on my domain name. I have to enter the email address, but the domaine part should be fixed and forced.
Historically, when doing this using AlternC, you find this form : a text area followed by @yourdomain.net, showing the right side already filled.
Graphically, it looks like a classical form field as follow :
A hype text field
Some days ago, trying to find a usable way of showing this, I had the following idea (I say I had this idea since I never saw this elsewhere) : we can use CSS styles to show something more obvious for human being. So I ended up with this:
There is many differences between those 2 forms, but the one we are interested in is the field where you can enter your email address.
This idea is simple, and I invite my fellow developers to use this kind of trick without any limitation : as long as it make a form more usable for your end user (ask him if you have any doubt ;) ).
Technically, it’s simple:
<input type="text" name="addresse" id="adrtxt" class="int" /><span class="int" id="adrlbl">@mondomaine.net</span>
border: 1px dotted black;
font-family: Verdana, Arial, Helvetica, sans-serif;
Finally, more tricks & tips I just remember :
list the words and terms you are using for each part of your software. For example, we are using "email address", and not "email", "mail", or "mail account". Build a glossary your developers will have to follow.
use radio button instead of dropdown lists if you want, unless the number of items may grow large (an example is shown below) :
before : after :
Leave some space inside your forms : the human eye need some kind of freedom to see things. For example, in the 2 forms below, you will see that there is more space between elements in the second form, but the border is also less visible, we are using a light gray: the eye can freely navigate inside this form.
And finally, if I remember other ideas regarding website or forms usability, I will post them here ;)
Welcome on Benjamin Sonntag's blog, web entrepreneur, Linux expert and free-software-savvy half-geek.
Here you will find geek tuff, tricks and tips and friendly ads, personal histories and a bunch of politics ...
On the same topic ...
In the Octopuce boat ...
- 26 September 2013 – Octopuce recrute un administrateur système confirmé
- 19 September 2013 – Conférence sur SSL/TLS à la Cantine
- 14 July 2013 – Outlook pour Mac, SMTP bancal et non corrigeable
- 27 March 2013 – Optimisation SQL, EXPLAIN et les fonctions dans WHERE
La Quadrature du Net
- 7 March – Réforme du droit d'auteur : la Commission européenne doit publier les réponses à la consultation sans attendre
- 5 March – La Quadrature du Net participera au débat sur "L'affaire Snowden" le 11 mars à 19h
- 26 February – Lutte contre la prostitution : les sénateurs doivent s'opposer à la censure privée du Net
- 18 February – Les négociations au Parlement européen sur la neutralité du Net prennent un tournant désastreux
- 12 February – La commission « Libertés civiles » du Parlement européen ouvre la voie à une réelle protection de la neutralité du Net
Old stuff ...
- 11 août 2011 – CCC Camp 2011, Day 1
- 3 August 2012 – Moglen at Re:Publica: Freedom of thought requires free media
- 27 December 2012 – 29c3 day 1, Jake on surveillance, Internet, Tor & Raspberry
- 16 janvier 2012 – ZeroForfait et Sosh : les pigeons se débattent
- 3 août 2012 – Moglen à Re:Publica : défendre notre liberté de penser exige des médias libres.