I have been thinking and looking around for registration/enrollment module. I started off looking at the survey module. It had a lot of what I needed but did not allow users to edit their answers. Then I looked at the forms module (required by survey). I could build on it to make new forms, then I ran into WebForm. This one kind of looks like forms+survey, and allows a bit more (like limiting the number of replies), but still not editing an answer (patch on the work). Then there is the signup module, that is a sort of enrollment module. It allows forms to be added to it by other modules.

Apparently CVS access will not be granted for creating a similar module (but Form+Survey is very similar to WebForm). I suddenly was looking at two very similar modules, none of which had all the functionality I wanted and thinking that maybe some of the redundancy could be eliminated by having a core “form building module”. Both modules have the same idea, allow user to create forms for the Form API via web. Both have some sort of validation. Both modules store data on tables, and the generate reports.

I think a “Form Builder Module” should have:

  • Build forms as a self contained unit (like views, nodes, users), after this the form can be added to anything by some module (like a survey, signup, node, etc); current implementation makes node and form tightly coupled, which is bad if you want to reuse a form (forms module allows reuse, but neither survey nor webform do);
  • Allow modules to modify the forms pre-render, post-validation, and post-save, something like the hooks used elsewhere (maybe even use Form API for this). This makes it easy to add module specific behaviour;
  • Have a default place to store form post, or let modules handle them;
  • Allow forms to link with actions and workflows, this can make other actions such as sending out email easy;
  • Allow modules to contribute with module specific validation routines;

I believe having a core module would make reuse larger, and more effective. The three modules I checked have the same overall “form building” idea, but do things differently. If I create a new module to do enrollments like I need them that is yet another module doing forms. I really think there is a need to have form creation feature, to be used by other modules that handle forms in different ways. It would also make modifying module forms more flexible, somewhat like CCK does for nodes.