Download & Extend

Please add Webforms Repetition Model

Project:Webform
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

I would love to be able to use the repetition model for webforms (http://www.whatwg.org/specs/web-forms/current-work/#repeatingFormControls). Unfortunately, this got removed from the HTML5 proposal when they integrated the webforms section, but that doesn't mean we can't build it. There's an implementation already out there (http://code.google.com/p/webforms2/), could it perhaps be a integrated or adapted to this module?

Basically, for the section of the form you want to make repeatable, you create a template. There'd be an Add button that copies the template and inserts it in the form. There'd also be a Delete button for each copy, allowing you to remove it from the form. The specs also describe moving the "rows" up and down, but that to me would be a lower on the priority list.

The reason I'm looking for this is I'd like to build a form where an end user can submit details (name, age, etc) for an arbitrary number of people (family members) on the same form when they request registration related information for our club. I would prefer this information to be structured in appropriate fields, rather than unstructured in a big textarea.

Comments

#1

This is rather unlikely to happen in the short-term. Adding an "add-more" button is a tremendous task in Drupal (I wrote the system that allows it, trust me it's not easy). The examples you linked to will not work in Drupal because any JavaScript-only implementation will trigger Drupal's security mechanisms and the submissions will be rejected. In Drupal you have to make an AJAX request to the server, tell it, "hey I'm making more fields", then get the new HTML back from the server and display it to the end user. Of course just displaying it on the page is only half the work, since our database structure would need to be changed to handle multiple values.

Anyway, unlikely to happen unless patches are provided. My busy schedule has caused Webform development to stall.

#2

Status:active» closed (duplicate)

Let's merge with #354381: Webform Submission with "add another" text field.

nobody click here