Git Product home page Git Product logo

jquery-form's Introduction

Interactive form

The objective is to achieve an interactive form that can animate with jQuery. It will be a form is very basic, with a few fields that will see their CSS style change as a user action. The aim is to verify the entered information: number of characters, ensure that the confirmation of the password is the same one, verify that all fields are filled, etc..

Goals

This form contains four fields:

  • A text field for the nickname;
  • A field password for the password;
  • A second field password for confirmation of the password;
  • And a final text field for the email address.

Two buttons respectively will send data, and empty fields. No server language for this exercise: everything will unfold client side.

You must ensure that the user enters the right information, in the right way:

  • All fields must contain at least 5 characters;
  • The password and confirmation must be identical;
  • If the fields are empty when sending it displays an error message.

To indicate the error to the visitor, simply use CSS: a red border would can be use for example. Similarly, if the field is good, you could change the color of the appropriate field in green.

Remember that you must do all cases, because it should never trust the user.

We give you a skeleton to start! It contains the HTML, CSS code, and integrates Bootstrap and jQuery!

Improvements

This form can be further improved, in the sense that you could further restrict the possibilities for the user, by prohibiting exceed a certain number of characters in the nickname, for example. Similarly, the style is now ultra basic, nothing prevents you from sophistication, so that the user experience is pushed to its maximum.

Some improvements to the security level could be made:

  • You could check the format of the e-mail address with a regular expression, made with Regex object of JavaScript;
  • You could also check that the password was sure, making such a security mini-indicator that would be based on the number of characters, diversity, ...
  • It is possible to display a help message for each field, when the user types text into them;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.