Standardizing HTML forms with the cfUniForm custom tag library

As web developers one of the most frequent things we’re tasked with building is some sort of form to capture data from our visitors. As we’ve all learned (some of us the hard way), putting a form out there and trusting that our visitors will use it exactly the way we design it every time is the proverbial pipe dream. How many times have each of us written Javascript functions to validate the entries into form fields? It’s much the same every time and, honestly, it gets old reinventing the wheel each time. Enter cfUniform, a very robust, open-source custom tag library from Matt Quackenbush (with others contributing).

cfUniform is a ColdFusion custom tag library that makes adding validation to your forms a snap. The fact that it writes (most) validation for you based on attributes you put in the tag makes it worth using for that feature alone in my mind. However, the benefits don’t stop with validation. It also styles your form fields, labels, hints and error messages for you. Since you can configure a link to a CSS stylesheet in the configuration for the custom tag, you can skin the output generated by cfUniform to match your site’s look and feel.

Read More