wordCounter

 

Limiting how many words a user can enter  into a text input helps streamline communications and limit noise. Twitter is a great example of this.  A tweet is limited to 140 characters which prevents the size of a tweet getting out of control.  A user can view their twitter feed without scrolling endlessly to get to the next tweet.   The limit of 140 characters was imposed because Twitter first started allowing users to send tweets via SMS which are limited to 160 characters. The extra 20 characters are reserved for usernames.

If user generated content is stored in a database then the field could be restricted by a character limit imposed by the database. If this is the case then its important to display this limit to the user when adding content. The user will not know the full count of words entered until the input is submitted and processed. After which the input is validated for character or word length. Whilst this is a  solid  method of validation it doesn’t inform the user of the current count during data input.  To get around this, javaScript can be used to listen to the key presses and report back the user.

Back in 2010 I created a javaScript word counter in the form of a jQuery plugin and then wrapped it in a Symfony plugin called sfWidgetWordCounterPlugin.

 

Facebook Twitter Digg Stumbleupon Email

  One Response to “wordCounter”

  1. Nice color choice on the blog. It is really easy on my eyes and I have bad eyes too so that’s a really big compliment lol
    My website is about Travel Tips.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© 2012 Peter Fisher Suffusion theme by Sayontan Sinha
WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera