Suggest a Snippet Login Register
  • LOG IN:

    Not a member? JOIN NOW!
     Username                   Password
    Remember me Recover password
DevSnippets Design Community & Snippets Gallery
  • Subscribe by RSS
>
  • Webdesign
    • Design
    • HTML5
    • lists
    • Menu
    • Navigation
    • Portfolio
    • Showcase
    • Template
    • Tooltip
    • Tutorial
    • webdesign
  • Web development
    • AJAX
    • CodeIgniter
    • CSS
    • CSS3
    • Database
    • Javascript
    • jQuery
    • Mootools
    • MySQL
    • PHP
    • PHP Framework
    • plugins
    • WordPress
    • WordPress Hacks
  • Inspiration
    • Fonts
    • Icons
    • Inspiration
    • Mac
    • Mac apps
    • Photography
    • Wallpapers
  • Snippets
In {Articles} -11th May- {40 Comments}

Creating Slick Forms Using Ajax, jQuery & CSS: No More Ugly Forms

Whatever content you have to present, you can present them in a more interactive & more responsive ways. In this article we’d like to present 10 Impressive techniques using some jQuery magic to style slick forms with a simple, rich user experience that gets them excited about your contact, register or whatever form you have.

A. Styling Forms Fields

1. iPhone-style Checkboxes

iphone-style-checkboxes implements the iPhone toggles as replacements for standard HTML checkboxes. Simply run the script and your site will be updated with these specialized controls. Best of all, the underlying checkbox is not touched and backend system will never know the difference. The change is purely visual.

iPhone-style Checkboxes

How to use it:

Once the files are available to your site, activating the script is very easy:

:::HTML
<head>
  <script src="jquery-1.4.js" type="text/javascript"></script>
  <script src="jquery/iphone-style-checkboxes.js" type="text/javascript"></script>
  <link rel="stylesheet" href="path_to/style.css" type="text/css" media="screen" />
  <script type="text/javascript">
    $(document).ready(function() {
      $(':checkbox').iphoneStyle();
    });
  </script>
</head>

The initialization method takes a handful of options.

  • - checkedLabel sets the text of the “on” state. Defaults to: ON
  • - uncheckedLabel sets the text of the “off” state. Defaults to: OFF
:::Javascript
$(':checkbox').iphoneStyle({
  checkedLabel: 'YES',
  uncheckedLabel: 'NO'
});

2. Uniform

Uniform masks your standard form controls with custom themed controls. It allows you to style checkboxes, drop down menus, radio buttons, and file upload inputs. It works in sync with your real form elements to ensure accessibility and compatibility.

Uniform

How to use it:

Using Uniform can be quite easy as well. Simply call:

$(function(){ $("select").uniform(); });

To “uniform” all possible form elements, just do something like this:

$("select, input:checkbox, input:radio, input:file").uniform();

3. Niceforms

Niceforms is a script that will replace the most commonly used form elements with custom designed ones. You can either use the default theme that is provided or you can even develop your own look with minimal effort.
Starting with the basic XHTML code for a web form, Niceforms parses the DOM tree, gets all the input fields, hides them, and positions their new graphical appearance in place. All this is done while preserving the date transfer and selection features of the regular form. Everything is done via javascript.

Niceforms

How to use it:

Niceforms is applied to all forms that have the class “niceform”. You can have other classes in there as well but one of them has to be “niceform” in order for the script to work. One of the important aspects of the script is that it requires a correctly coded form, including properly declared labels and values. There’s not much room for error and, if anything, it will force you to code your forms correctly.

4. jQuery MultiSelect Plugin w/ ThemeRoller Support

This plugin turns an ordinary HTML select control into an elegant drop down list of checkboxes.
MultiSelect is compatible with jQuery 1.4.0+ and all themes from jQuery UI 1.7+. It is known to work in Firefox 2+, IE 6+, Chrome Beta/4, Safari 4 and Opera 10.

jQuery MultiSelect Plugin w/ ThemeRoller Support

How to use it:

First ensure you’ve included jQuery 1.4, a jQuery UI theme of your choice, and the jquery.multiselect.css file. You don’t need the jQuery UI library itself, just the theme files. The simplest use of MultiSelect is to bind the widget to your select box:

<select id="MySelectBox" multiple="multiple" name="MySelectBox">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
</select>
$(document).ready(function(){
    $("#MySelectBox").multiSelect();
});

5. Perfect signin dropdown box likes Twitter with jQuery

This tutorial will show you how to create a login drop down with Twitter style using jQuery. It’ll help you save the space on your webpage and make visitors feel comfortable by the awesome toggle login form.

Perfect signin dropdown box likes Twitter with jQuery

How it works:

When users click on the Sign In button, it’ll call a new function. At first, the Login Form (under the tag) will be showed, then the link with class name “.signin” will add one more class name “menu-open” to change the background image.

<script type="text/javascript">
        $(document).ready(function() {

            $(".signin").click(function(e) {
                e.preventDefault();
                $("fieldset#signin_menu").toggle();
                $(".signin").toggleClass("menu-open");
            });

            $("fieldset#signin_menu").mouseup(function() {
                return false
            });
            $(document).mouseup(function(e) {
                if($(e.target).parent("a.signin").length==0) {
                    $(".signin").removeClass("menu-open");
                    $("fieldset#signin_menu").hide();
                }
            });            

        });
</script>

B. Making Forms Work: Validating & Submitting Form Data

1. Fancy AJAX Contact Form

In this tutorial we are going to learn how to make an AJAX contact form which leverages modern web development techniques.
We will use PHP, CSS and jQuery with the help of the formValidator plugin for form validation and the JQTransform plugin, which will style all the input fields and buttons of the form. In addition we are using the PHPMailer class to send out the contact form emails.

A Fancy AJAX Contact Form

2. the Ketchup Plugin

Ketchup is a slim jQuery Plugin that validates your forms. It aims to be very flexible and extendable for its appearance and functionality. Although Ketchup is designed to be styled and extended by you it already looks tasty and gives you the most common validations by default.

the Ketchup Plugin

Ketchup provides some callbacks to completely control the markup and show/hide behaviour of the error-container, which simply can be styled via CSS.
Ketchup don’t force any markup on you. Build your own error-container, either with HTML code in a string or the element builder as shown in the example via the errorContainer parameter:

$('#example2').ketchup({
  validationAttribute: 'rel',
  errorContainer: $('<div>', {
    'class': 'ketchup-error-container-alt',
    html: '<ol></ol>'
  })
});

3. AutoSuggest jQuery Plugin

AutoSuggest is a very lightweight jQuery plugin that makes auto-completing extremely easy. It will turn any regular text input box into a rad auto-complete box. It will dynamically create all the HTML elements that it needs to function. You don’t need to add any extra HTML to work with AutoSuggest.

AutoSuggest jQuery Plugin

AutoSuggest uses ZERO images! All styling is done 100% in the included CSS file. This means it is super easy to customize the look of everything! You only need to edit the included CSS file.

How to Use it:

$(function(){
    $("input[type=text]").autoSuggest(data);
});

The above line of code will apply AutoSuggest to all text type input elements on the page. Each one will be using the same set of Data.

4. A jQuery inline form validation, because validation is a mess

When it comes to form validation, it’s hard to have a versatile solution that works with every form. Figuring out how to display errors is not a simple task. This is something I tried to remedy with this script. When an error needs to be displayed, the script creates a div and positions it in the top right corner of the input. This way you don’t have to worry about your HTML form structure. The rounded corner and shadow are done with CSS3 and degrade well in non compliant browsers. There is no images needed.

A jQuery inline form validation, because validation is a mess

5. Uploadify

Uploadify is a jQuery plugin that allows the easy integration of a multiple (or single) file uploads on your website. It requires Flash and any backend development language. An array of options allow for full customization for advanced users, but basic implementation is so easy that even coding novices can do it.

A jQuery inline form validation, because validation is a mess

Category: Article | Leave a Comment | 40 Comments

Related Posts

40 Comments, Add Comment or Ping

  1. Greg Babula says:
    May 11, 2010 at 4:47 am

    Sweet, thanks!

  2. ThunderZeaL says:
    May 11, 2010 at 7:49 am

    Thx, there are some great ressources !

  3. Dean says:
    May 11, 2010 at 8:37 am

    Nice examples…..

  4. ed says:
    May 11, 2010 at 9:11 am

    Nice post. Forms are like chairs, they’ve been around since the dawn of man. You can always restyle them and tweak functionality, but you will never replace them. Remember, King Tut and Jesus sat on chairs just like I’m sitting on a chair now, same as having to submit information through a form.

    • Mootled says:
      May 12, 2010 at 3:06 am

      Great post. (Don’t think king tut had to fill in too many forms, though, ed. Little job perk of being Emperor/God of your country.)

  5. Yosry says:
    May 12, 2010 at 3:13 am

    here is some great forms really ..
    many thanks

  6. Laura says:
    May 12, 2010 at 5:22 am

    Great forms.
    Thank you!!

  7. Florian says:
    May 12, 2010 at 5:25 am

    Great post, but the last Validating script (“Uploadify”) has the same picture as “A jQuery inline form validation, because validation is a mess”. Is that right?

  8. Erik Giberti says:
    May 12, 2010 at 10:06 am

    Try extending the autocomplete functionality to populate more than just the current field, very useful for city/state lookups and more: http://af-design.com/blog/2010/05/12/using-jquery-uis-autocomplete-to-populate-a-form/

  9. Simon says:
    May 12, 2010 at 12:13 pm

    Thanks for these great forms! You could complete this list with Faary.com – free, online CSS/XHTML form builder

  10. TonyB says:
    May 12, 2010 at 2:05 pm

    Great except the examples do not style properly in IE8.

  11. Michael Pehl says:
    May 12, 2010 at 3:21 pm

    Wrong picture for Uploadify btw ;)

    Some nice inspirations for “forming” :)

  12. sanal şirket says:
    May 21, 2010 at 8:40 am

    this is amezign tutorial… Thanks

  13. Half Price Geeks says:
    June 10, 2010 at 8:29 pm

    Wow! Thanks for taking the time to put this together! I can’t wait to tweak a few of my existing forms.

  14. cristian tudorache says:
    June 11, 2010 at 12:03 am

    great. just great resources!

Trackbacks/Pingbacks

  • designfloat.com
  • Creating Slick Forms Using Ajax, jQuery & CSS: No More Ugly Forms | DevSnippets « Netcrema – creme de la social news via digg + delicious + stumpleupon + reddit
  • designpoke.com
  • Creating Slick Forms Using Ajax, jQuery & CSS: No More Ugly Forms | DevSnippets : Popular Links : eConsultant
  • Creating Slick Forms Using Ajax, jQuery & CSS: No More Ugly Forms | Design Newz
  • links for 2010-05-11 « Mandarine
  • Creating Slick Forms Using Ajax, jQuery & CSS: No More Ugly Forms | pro2go Designs Blog
  • Creating Slick Forms Using Ajax, jQuery & CSS - Robert Bojor
  • Moduli, di tutto di più — Studio404 Web Agency
  • Primeira parte do estudo de caso da clínica
  • SQL Server 2008 question?
  • Is the Microsoft SQL Server 2008 R2 Express FREE?
  • Terceira parte do estudo de caso da clínica
  • Weekly Design News – Resources, Tutorials and Freebies (N.37) - Speckyboy Design Magazine
  • Be Yourself Seduction.
  • can sql server 2005 express make my video files on the column on a table?
  • Workbench
  • Uso de MysqlWorkbench-Creando Diagrama Entidad Relacion
  • is it possible to create a master/ detail form with sql server 2008?
  • Hotels of the Disneyland Resort
  • are LED light bulbs dimmable?
  • Solar powered torches – where to get them from?
  • mysql workbench.mov
  • SSISxpress for SSIS SQL Server 2005 or 2008, Add value to SSIS packages, by Pragmatic Works
  • Interessante websites met Plugins « Showcase

Sponsored Ads

ADVERTISE HERE

Sponsored Ads

DevSnippets Latest Articles

  • Using Illustrations in WebDesign: 30 Creative Examples
    Tags: Illustration, Inspiration, webdesign Jul/20/2010
  • Dark and Mysterious High Quality Desktop Wallpapers
    Tags: Dark, Wallpapers Jun/23/2010
  • 10+ Most Beautiful Island Photography on Earth
    Jun/16/2010
  • 35 High Definition iPad Wallpapers For A Great Experience
    Tags: Inpiration, Wallpapers Jun/09/2010
  • 30 Unique Logo Designs That Actually Say Something
    Tags: Branding, Inspiration, Logo Jun/02/2010
  • Creating 10 Most-Used Javascript Techniques Using Pure CSS Styling
    Tags: CSS, Tutorial May/31/2010
  • 40 Creative Advertisements With Unexpected Ideas
    Tags: Advertising, Inspiration May/27/2010
  • Getting Slim, Spicy, & WordPress-Ready with Top 10 jQuery Plugins
    Tags: jQuery, WordPress May/25/2010
  • Spicing Up Your Tumblr Experience: Beautiful Themes, Icons and Apps
    Tags: Templates, Tumblr May/19/2010
  • 20 NEW & FREE High Quality (X)HTML/CSS Templates
    Tags: CSS, Design, Template, Tutorial May/17/2010
More Articles →

Design Community News

  • Is It Worth Shifting To Photoshop CS5?

    SloDive
    Jul/04/2010
  • Free Wordpress Theme Vector Nature Template

    templates4all
    Jul/04/2010
  • Best jQuery plugins – June 2010

    Spider8411
    Jun/22/2010
  • Freebies: Vintage Mega Pack 10 Samples from Designious.com

    Doink
    Jun/22/2010
  • CSS3 Animations, the Power Back to CSS Part 1: Transitions

    Teylor Feliz
    Jun/22/2010
  • Create a Photo-Realistic Candle with Basic Photoshop Tools

    Frank
    Jun/22/2010
  • Credit cards and payment icon set

    icon sets
    Jun/22/2010
  • 40 Refreshing Nature Inspired Web Designs

    Brukhar
    Jun/22/2010
  • How to Create a Tumblr Theme (Code Structure)

    Dainis Graveris
    Jun/21/2010
  • The Simple Photoshop CS5 Cheat Sheet

    Frank
    Jun/21/2010
More News →

Our Friends

  • Graphic Design School

  • Designm.ag

Top ↑

Add a Snippet / Design News

© 2008-2010 DEVSNIPPETS | Made by Noura Yehia | Submit Snippet | About| Subscribe | Advertise
In partnership with (mt) Media Temple