jQuery Break form into steps

2019-09-17 09:51发布

I have a little jQuery script where a user is able to create and append form fields to create a form. I'm adding a feature where a user can add page break anywhere in the form so that the form can split into parts. So first part shows the fields until it detects page break, then user clicks on next, and the second set of fields will show until page break and so on. I was thinking i could break the pages using <hr/> so each set of fields will show until the <hr/> break.

The idea is a little vague. How would you approach this?

标签: jquery forms
2条回答
Animai°情兽
2楼-- · 2019-09-17 10:02

You could hide each form section and add a listener to each 'next' button to show the subsequent form section.

查看更多
聊天终结者
3楼-- · 2019-09-17 10:20

There are some plugins that do this. I have used http://thecodemine.org/ with success. There are a lot of plugins to do this, just Google jQuery form wizard.

查看更多
登录 后发表回答