开发者

Building a paged form in Rails, what is the best approach?

开发者 https://www.devze.com 2023-02-27 08:50 出处:网络
I have a Rails application which gathers a large amount of information fr开发者_运维知识库om applicants - mostly just the usual: names, proof of ID, address history, employment details and some person

I have a Rails application which gathers a large amount of information fr开发者_运维知识库om applicants - mostly just the usual: names, proof of ID, address history, employment details and some personal references.

At the moment the form is implemented using jQuery UI tabs to break down each section into a page (roughly 7 pages). This has worked well in the past, however a lot of users are now complaining that it is very slow - because the pages are simply too big that their browser chokes modifying the DOM every time they change tab.

What I would like to do is only render the form fields required for that page, and only call the validations required for those fields when leaving the page to progress to the next.

What is the best approach to this in Rails?


There is a Railscast for that:

http://railscasts.com/episodes/217-multistep-forms

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号