Text box ‘hint’ values with jQuery

On creating a rather large form recently, I was in the need to have some kind of hint to the user about what format the content should take on several input boxes. I could have done this with a description under the form element, but a more accepted way to do this, it seems, is to have a ‘hint’ in the element itself. You know the kind of thing I mean; a value, usually quite a light grey colour, that is present until you click in to the form element and then is disappears. I also wanted to do this as a jQuery plug-in because, well, why not? 🙂

Continue reading “Text box ‘hint’ values with jQuery”

Did you like this? Share it:

Shorten urls automatically with a Zend Framework filter

I think we can all agree that URL shortening services are great and are very handy to tidy up those long and obnoxious links. However, a lot of the time people simply forget to use them, or often don’t know about them in the first place. I’ve noticed this in a blog system I wrote using Zend Framework. On one hand I love that people post messages, but on the other it annoys me that they may supply a link that is so long it breaks the formatting of the page, or looks just plain ugly.

So what are my options? I could train everyone who posts blogs on the system to use a url shortening service or I could manually tweak all the links myself. As solutions they are not very practical at all; I don’t have the time to change any/all links myself, and I certainly don’t have enough patience to train everyone! So an automatic way of doing things is needed, and the filtering in Zend Framework comes to the rescue!

Continue reading “Shorten urls automatically with a Zend Framework filter”

Did you like this? Share it: