It has occured to me that a large part of my job is really just building the same thing over and over again.
These are fundamentally complex multipage forms e.g. mortgage applications, insurance, etc.
Is there a common / well used model for such things? I don't care what language / technology is used. I'm thinking XML / language neutral ideally.
Forms multiple criteria branching. 1 1. Click onto the ellipses (...) menu, top right of the screen (next to Share ). 2 2. Click onto Branching. 3 3. Configure your questions as needed (see image below).
Why Use a Multi-Page Form? Before we jump into multi-page form examples, let’s look at why you should consider breaking long forms into multiple pages. Sometimes in order to get a site visitor to convert, you need to get a lot of info from them. In fact, unlike simple contact forms, you might need much more than just a name and email.
Therefore let’s do the base setting for using conditional logic. First, you place three multiline text boxes via drag-n’-drop beneath the page divider. Reminder: We’ve chosen Request, Information and Feedback as selected values (see step 5) so that we need three suitable text boxes.
First, you put it on the bottom of the page via drag-n’-drop. Then you click on “ edit ” and select the “ advanced ” tab to use the conditional logic again.Now we have several steps to consider. (1) First click on “ add a set of conditions ”.
You can also use http://www.springsource.org/spring-web-flow:
Spring Web Flow is a Spring MVC extension that allows implementing the "flows" of a web application. A flow encapsulates a sequence of steps that guide a user through the execution of some business task. It spans multiple HTTP requests, has state, deals with transactional data, is reusable, and may be dynamic and long-running in nature.
It is perfectly integrated also in Groovy & Grails (Webflow Doc) . Groovy is an script-like extension of Java, whereas Grails is webframework that uses among other things Spring, Hibernate...
Personally I use Django to build my forms. I've done complex multi-step forms, where steps are conditional by using the django.contrib.formtools.FormWizard
and using a factoryfunction to create the Form class for the step like this:
class SomeWizard(FormWizard):
def process_step(self, request, form, step):
if form.is_valid() and step == 0:
#compute step 2
Step2 = second_step_factory(form)
self.form_list[1] = Step2
And the step it with a placeholder when instantiating the Wizard object:
def some_form_view(request):
Step1 = first_step_factory(request)
placeholder = second_step_factory()
return SomeWizard([Step1, placeholder])(request)
In Django 1.4 the FormWizard has been replaced by a different implementation, I've not looked at that yet.
If you want a language neutral, more declarative option, you can have a look at XForms. Browser support seems a bit abandoned, but there are XSLTs that will transform your XForms into HTML.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With