For D6 I use webforms for almost every site I bake. Nodes are too heavy in most use cases, so TG for webforms!

D7 has fieldable entities. That made me think... Webforms does not use the new Fields API, while it is basicly the same thing. Attach fields to a 'thing'.
I did some work on a 'Forms' module. Goal is to have a module that provides frontend forms... webforms! Although I didn't map all kind of cool features and just made a proof-of-concept, I think that attached module is a great start for webforms-7.4.

Some advantages that the Fields API approach could have:
- Reuse of code
- Support for all Fields
- Unified way for admins/editors to build forms
- Views 3 support (nearly out of the box)
- Rules support (nearly out of the box)

Any thoughts?

Note: attached module is a proof of concept and far from alpha stage! Don't use it! unless you are nuts ;)

CommentFileSizeAuthor
forms.tar_.gz5.76 KBFrans
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Probably not going to happen in the near future. See #118984: Field API based rewrite of webform module

Frans’s picture

I do agree that Fields API isn't designed for 300 fields per bundle... but in how many use cases you have 100+ fields for a form?
Since the way Fields API works is the problem, not the concept of Form as Entity, shouldn't we fix that in Fields API? (and fix huge User Entities and huge Node Entities at the same time?)

The advantage of reusing code is bigger imho then the disadvantages...

quicksketch’s picture

Status: Active » Closed (duplicate)

Let's consolidate this with the other issue. I've already stated my opinion on this.

lsolesen’s picture

+1

Anonymous’s picture

Another problem that I'm always finding myself tackling is maintaining relationships between form submissions and other entities or nodes. For example, a recent project I"m working on allows students to sign up with a volunteer site, which might require an initial intake webform, as well as several other forms to be filled out during the signup process. The final record of "Person A is signed up with site B" is a separate entity, but then we need to store a reference to all these form submissions to be used later.

If submissions were exposed as entities, the Relation module's API could be used to build complex relationships between submissions and other entities. Right now I'm working on coding a submission reference field; however, that is less clean than it could be if submissions were honest-to-goodness entities.

Anonymous’s picture

Had a similar requirement to add relationships between individual submissions and other entities for a project, wrote a simple entity type that exposes submissions as entities. Posting here for posterity, interested to see if this should start to become a more official project:

http://drupal.org/sandbox/kevee/1324794

gamelodge’s picture