Prevent form submissions with javascript disabled

One of the first steps in validating form data is with JavaScript. And with JavaScript disabled you are open to possible invalid input data. Of course everyone further validates the form data on the server, but that entails a round trip if errors are encountered. In many situations it is just better to prevent any form submissions from the browser itself. The following few tips will enable you to quickly disable form submission if JavaScript is disabled in the browser.
(more…)

Read More

Building a self-correcting email input field

Email is one of the common input fields in any web form. Many sites use two email fields to make sure that the user has entered correct email ids. This is a common idiom in web design, and it is surprising that it has not changed over all these years. One of the interesting alternative I found is the ‘MailCheck’ JavaScript library. The library enables you to offer the user a suggestion for the domain name if he makes a mistake while entering. A demo is shown below.
(more…)

Read More

Quick web forms in php

One of the most boring task for me during development is that of creating forms. I like to get the task done as quickly as possible and get on with the back-end code. There are many javascript and php libraries that enable you to do just that, but you always need to integrate the two together to get a workable form. MVC frameworks provide a nice way to quickly create a form with all the validations and errors nicely built in. But for non-framework applications we have to rely on libraries or create a form code from scratch.
(more…)

Read More