For instance, consider the "DMV 14" form, from the Department of Motor Vehicles in California, which allows you to list multiple vehicles. In the paper version of the DMV 14, the fields for a vehicle have been repeated 3 times, allowing a maximum of 3 vehicles to be entered. This is how things were on paper, and often today still with PDF, but with web forms, we can do much better: we can enable end users to add or remove vehicles, without even having to impose a limit on the number of vehicles users can enter. And of course, what works for vehicles, works for any set of fields you'd like to see repeated.

When filling out the form, users add new lines as necessary clicking on the + sign.
Note how the label for the fields, instead of being repeated on each line, show just once in the table header. Such a table layout works well when you have a few fields repeated. But as the number of fields grows, you'll want to put them on multiple lines, and it will then be a block of lines that gets repeated. This is what we did in the following example, creating a total of 6 fields to be repeated:
Now note how, both in Form Builder (above) and when users fill out the form (below), the labels for the fields show above each fields, as having them just once in the table header wouldn't work anymore. And all this is automatically handled for you.
Repeats in Form Builder will be part of the next release of Orbeon Forms, and if you feel adventurous, you can try them today by downloading a nightly build.
Great news. Thank you!
ReplyDelete