Git Product home page Git Product logo

fromstep's Introduction

multiStepForm jQuery Plugin

A simple but great jQuery plugin to create a multi-step form.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

You should have latest version of jQuery included in your page inorder to make this plugin work.

Steps for how to install and use this plugin.

Step 1.

Simply include multistep-form.js.

Step 2.

Make sure you have added .tab , .previous , .next .step and .submit classes inside your <form> to appropriate tags.

Simple Example:

<form id="myForm" action="/register.php">
	  <h1>Register:</h1>
	  <!-- One "tab" for each step in the form: -->
	  <div class="tab">Name:
	    <p><input placeholder="First name..." name="fname"></p>
	    <p><input placeholder="Last name..." name="lname"></p>
	  </div>
	  <div class="tab">Contact Info:
	    <p><input placeholder="E-mail..." name="email"></p>
	    <p><input placeholder="Phone..." name="phone"></p>
	  </div>
  <div style="overflow:auto;">
    <div style="float:right;">
      <button type="button" class="previous">Previous</button>
      <button type="button" class="next">Next</button>
      <button type="submit">Save</button>
    </div>
  </div>
  <!-- Circles which indicates the steps of the form: -->
  <div style="text-align:center;margin-top:40px;">
    <span class="step">1</span>
    <span class="step">2</span>
    <span class="step">3</span>
    <span class="step">4</span>
  </div>
  </form>

Step 3. Simply call multiStepForm() on your form id, and thats it!

For example:

$("#myForm").multiStepForm(
{
  // defaultStep:0,
  callback : function(){
    console.log("save");
  }
}
).navigateTo(0);

About Author

  • Hirdesh Vishwdewa - I work on PHP, jQuery, Angular

License

This project is licensed under the MIT License.

Acknowledgments

  • Inspiration form w3schools.com's multistep form example

Demos

fromstep's People

Watchers

Mominul Islam avatar

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.