This task is to create a module that makes the implementation of hook_form_alter totally unnecessary. To do this, you will achieve the equivalent through the user interface. This module would ideally:

1) Provide a link at the bottom of each form, visible only to administrators, that would take you to the edit page for this form.

2) Provide an edit page that allows you to reorder the elements. Would preferably use the tabledrag API.

3) Create a hook that will allow other modules to edit other properties of form elements: for example, their titles.

Mentor: cwgordon7

Comments

rszrama’s picture

Just to clarify... you're purely talking about reordering form elements, not removing hook_form_alter() altogether? A lot more goes on in hook_form_alter() than just reordering elements. (For example, adding entirely new form elements or validation/submission handlers.)

Remember, any module that allows for the reordering elements is going to have to implement hook_form_alter() to adjust the weights. ; )

It seems like a better title for the task would be "Create a module that allows for admin reordering of form elements" or something similarly specific.

cwgordon7’s picture

Title: Create a module that makes the implementation of hook_form_alter totally unnecessary. » Create a module that makes the implementation of hook_form_alter available through the UI

better? :)

rszrama’s picture

hehe I suppose. I still don't know what else you'll be able to make available besides reordering/removal of form elements. Anything beyond that would be accomplished a lot more easily (and maybe only) through a module implementing the hook. (Hmm... it might be nice to use an interface to add custom description text to form elements where none exists.)

Also, for renaming titles and fieldsets, I wonder if it isn't better to defer to an actual localization module instead of trying to duplicate that through form altering type of interface.

Not trying to be a naysayer, just refine the goals of this task so it's something that can be accomplished. : )

solipsist’s picture

Have you seen this module?
http://drupal.org/project/formdefaults

cwgordon7’s picture

Status: Active » Closed (fixed)

Withdrawing task.

solipsist’s picture

I had this exact idea for weeks until one day I decided to look it up and found Form Defaults... I think we just stumbled on another issue: it must be easier to search for modules on drupal.org! Perhaps it's suitable for DROP. Some kind of usabiliity report on the project pages might yield useful info.