Multi Step Form with Step Progress Bar in HTML CSS & JavaScript

Hello readers, Today in this blog you'll learn how to create a Multi-Step Form with Step Progress Bar using HTML CSS & JavaScript. Earlier I have shared many blogs on how to create Login Form using HTML & CSS. So now it's time to create a Multi-Step Form in HTML.

A Multi-Step Form is a long-form that has broken into multiple pieces. This type of form asked you to enter your details step by step before submitting your form. Some Multi-Step Form has Step Progress Bar on the top of Form or on some website it's placed on the bottom. Generally, This progress bar indicates or informs a user how many steps they have completed and how many steps are remaining.

As you have seen, this type of Multi-Step Forms in many websites. Some of them are created using Bootstrap. But today in this blog, I'll share with you this program (Multi-Step Form with Step Progress) which is based on HTML CSS & JavaScript. I didn't use any JavaScript library to create this form.


This form is a long-form and it has broken into four steps. In each step, there are questions which user needs to enter. And I've also added a step progress bar on the top of Form which indicates steps. There are two buttons (Next and Previous) on each step. When you click on the next button it'll redirect you to the next step and when you click on the previous button it'll redirect you to the previous step.

If you're feeling difficulty to understand what I am saying. You can watch a full video tutorial on this program (Multi-Step Form in HTML).

Video Tutorial of Multi-Step Form in HTML & CSS



I hope you like this Multi-Step Form and understood the basic codes of this program. As you have seen in the video, I didn't use any JavaScript library and CSS Framework to create this Multi-Step form. You can use this form on your websites and projects.

If you have basic knowledge of HTML CSS & JavaScript then you can also create this type of Multi-Step Form. Nowadays, this type of form is trending and used by many popular websites.

If you like this program (Multi-Step Form Design) and want to get source codes. You can easily get the source codes of this program. To get the source codes you just need to scroll down.

You might like this:


Multi-Step Form using HTML CSS & JavaScript [Source Codes]

As always, before sharing the codes of this program (Multi-Step Form Design). Let's a few talk about the main tags and codes of this program. In the HTML File, first I created a <div> and placed all other tags inside it. Then I created <form> and placed <input> and <button> inside this tag. After that, I pasted this same codes four times and change their title.

In the CSS File, first I set a background image and placed all elements at the center. Then I gave specific height, color, padding to form a container. After that, I placed all steps horizontally and did basic styling to input, button, text, etc. Then I have hidden all the other three steps and create a step progress bar on the top of the form. Then I did some styling to this step progress bar.


There are many things I left. I can't say all things in writing. But don't worry you will understand all codes of this program (Multi-Step Form) after getting source codes. You can watch a video tutorial above for a better understanding of codes.

To create this program (Multi-Step Form). First, you need to create three Files (HTML, CSS & JavaScript). After creating these files just paste these following codes in your file. You can also download the source code files through the given link. In the source files, there you also get a background image of this program. Click here to download source code files.

HTML FILE:

CSS FILE:


JavaScript FILE:

Thanks for visiting, Keep visiting.


30 Comments

We welcome relevant and respectful comments. Off-topic or spam comments may be removed.

  1. Hello sir.... Which plugin you are using for copy text.

    ReplyDelete
  2. i am facing such problems in style and button text is over released of container can you solve this one issue...

    ReplyDelete
    Replies
    1. Sure send me your codes on my Instagram Account.

      Delete
  3. can you please help me to insert data in MySQL database. I am using this form.. but i can't to insert the data in database. please help me as soon as possible.its very urgent.
    one more thing..when i clicking the next button for first time.. it automatically reloading. after that when i clicking the next button..its work properly. please check...
    please please help me to insert the data in database. please reply me as soon as possible. you can ping me on my ph.number- 8670433547 this is my also whats app number. my email id is subhabrataroy61@gmail.com

    ReplyDelete
  4. I would like to try this kind of form in asp.net. Can i get any idea how i can implement this using ASP.net

    ReplyDelete
    Replies
    1. Thanks for your reply!!
      The only problem I am getting if I am trying to create this with ASP.net that the form tag getting nested with another form tag.
      So is there any substitute of code to change following:-
      form action="#"
      Would like to hear from you soon.

      Delete
  5. Hey when I am using it on my phone devices it's not working properly. When I click on the next button it reloads to its
    First page. In laptop it's working. And When I tried to make a 5th page of this form the previous buttons are not working. I even did some changes according to the way the 5th part.

    ReplyDelete
    Replies
    1. This form is not responsive for mobile devices and I don't know what mistakes you did. If possible send me your codes on my Instagram account.

      Delete
    2. Unfortunately, I get the exact same issue on the desktop version too. Guess its related to the animations. If you comment the animation and transition style attributes in the css everything works great. As I do not need the animations for my use-case, this workaround is working fine for me. @CodingNepal: Great template and great work by the way! I like it!

      Delete
    3. Well.. My first try was misleading. The actual issue is related to the form which is triggered with each button click inside the form because non of the buttons is preventing the event defaults. So if you change click event listener by adding the event parameter 'e' and then call e.preventDefault(), you have fixed the issue.

      For example:

      nextBtnThird.addEventListener("click", function(e){
      e.preventDefault();
      slidePage.style.marginLeft = "-75%";
      ...
      }

      Do so for all buttons except the submit button itself, which indeed should trigger the form action!

      Delete
    4. You Man, you are the best coder I've ever met.

      Delete
  6. And listen what I am trying to do is to merge this form and in its 5th page I want that 'strength password meter' that you have created.

    ReplyDelete
    Replies
    1. Okk...you can merge if you know JavaScript perfectly.

      Delete
  7. Hello, first of all, good day. Thanks for sharing this user form. I added a photo to the second page and an ID number on the third page. But I have a question that I guessed by javascript.If I add a photo on the second page, it will continue if I don't. I would love it if you could help me how to handle this problem. Good work, everyone.

    ReplyDelete
    Replies
    1. Please contact me on Instagram with your problems.

      Delete
  8. Thank You Sir admin Codingnepal about this tutorial,can u make tutorial for panel admin hotspot mikrotik

    ReplyDelete
  9. thank you for this code. i have learn many thing form your video in youtube. hope there is more to see from you. it will be nice if it was perfect for responsive also.

    ReplyDelete
    Replies
    1. I'll make responsive in my upcoming videos. Stay tuned.

      Delete
  10. Could you just provide me with only the functional Step Progress Bar with those buttons and without the form submittion?

    ReplyDelete
    Replies
    1. Just download the files and copy the required codes only.

      Delete
  11. whe i click next, its not going to next

    ReplyDelete
  12. I tried this thanks,,,how do i add a top navbar to this because it's not working for me.

    ReplyDelete
  13. i try to use something similar on ASP.NET MVC and all the steps group up on one form.

    ReplyDelete
  14. Hi buddy(CodingNepal)i saw your video and it was amazing ... but i have a problem . i have 9 form and in this tutorial you have made 4 forms out of 100% width with 25% each... what i have to do to make it for 9 form. please tell me asap.

    ReplyDelete

Post a Comment

We welcome relevant and respectful comments. Off-topic or spam comments may be removed.

Previous Post Next Post
CodingNepal
Subscribe our YouTube Channel