Coordinate with more modules

Dave Reid - October 12, 2009 - 19:06
Project:Form controller
Version:6.x-2.x-dev
Component:Code
Category:task
Priority:normal
Assigned:sun
Status:active
Description

Figured there are more modules that could really benefit and coordinate with form controller and make things easier for modules in Drupal 7.

Basically any spam module that needs any-form protection:
- Mollom
- CAPTCHA
- Hashcash

#1

sun - November 14, 2009 - 23:46

For global reference: #245682-65: Enable use of Mollom for any form

Committed attached patch as baseline.

Will hook up some rough concept code now.

AttachmentSize
form_controller-HEAD.d6-basics.patch 8.39 KB

#2

sun - November 15, 2009 - 00:35

It's getting very advanced and weird now. Are you sure you want to subscribe and follow this issue? ;)

#3

sun - November 19, 2009 - 15:58
Component:Miscellaneous» Code
Assigned to:Anonymous» sun

Alrighty. Here's the pre-alpha code I committed to HEAD today.

Plenty of @todos, but the basic functionality + very stupid example implementation works like a charm.

After talking back to Dries, we will consider (optional) support for this in a next step for Mollom module. FYI: I'll work on the Mollom patch now.

AttachmentSize
form_controller-HEAD.revamp.1.patch 14.44 KB

#4

sun - November 19, 2009 - 16:08
Version:5.x-1.x-dev» 6.x-2.x-dev

#5

Dave Reid - November 22, 2009 - 18:19

Subscribing. Pure awesomesauce so far.

#6

Dave Reid - November 25, 2009 - 21:14

Also, Vertical Tabs is an awesome candidate for this. Would be nice if we had generic code to not only fetch all 'input' elements but fieldset or 'base' elements since that's what vertical tabs works with.

#7

Dave Reid - November 25, 2009 - 21:25

Should we maybe keep track on a wiki page or something with all the modules that could benefit from this? There are going to be a crap ton.

#8

sun - November 26, 2009 - 09:07

I think the API + module + UI should be in shape first. ;) Currently, this is really proof-of-concept code quality only. While working on the Mollom patch (which would probably be one of the most challenging consumers of this), I identified plenty of hidden/detailed requirements that won't be easy to account for (such as additional form element mappings, #642702: Form validation handlers cannot alter $form structure, etc).

One further problem is that forms may contain dynamic elements. For example, the comment and node forms only contain author information if the current user has administer permissions. While that would be ok for managing and configuring forms, it will possibly break during processing and execution of configured form attachments/alterations. And while the solution to this is totally trivial (always use #access and NOT an if statement in PHP), I'm not sure whether this simple fix will have a chance to still get into D7. We could try, but we'd have to join forces for that.

At least my User API revamp made the user account/registration forms already comply to this, so those should be ok already.

Furthermore, we should talk back to quicksketch to ensure that we do not duplicate efforts regarding form_builder. I don't think so, but it would of course be nice to have these two developments complement each other in the end.

 
 

Drupal is a registered trademark of Dries Buytaert.