I'm going to be a very willing tester of this module next week... a UI for form_alters is one of the most useful and time-saving changes I can think of in my Drupal workflow. It would be great if there were either (a) a tiny bit more documentation on the module page (how to use it, basically), or a handbook page (linked from the front page of this module).

Thanks for your work so far on this module!

Comments

BenK’s picture

Subscribing...

mattiasj’s picture

subscribing

lyricnz’s picture

Hi guys. Happy to have you around! Here's a couple of notes, that will one day be documentation:

Form Alter UI is a module for altering forms in a Drupal installation, using a point and click interface.

USAGE:

Install this module as per normal. Then open /admin/settings/form_alter in your browser, and enable the checkbox at the top: this allows Form Alter UI to "record" forms as they are used on the site. Next, browse to a page that contains the form you want to alter - this will cause the form and its data to be recorded in the database. Now, go back to /admin/settings/form_alter and you will see a log of forms recorded, ordered by the last-access date.

Click on "modify" next to the form you are interested in, and you will be presented with the "form alteration screen". The page contains a number of collapsed sections, one per field (or fieldset). Scroll down to the field you want to modify, and expand the region.

Within that region, there are some controls that allow you to modify basic form-element settings (eg: Title, Description, etc). Over time, we expect to add more "nice editors" for different attributes of the element.

There is also a textarea where you can enter PHP code for modifying that element. During execution of this PHP code, you should modify $element, and this will be reflected in the form.

TODO: ctools exportable
TODO: move configuration to custom table
TODO: draggable weight-ordering
TODO: better editors for element attributes
TODO: imagecache-type UI (add modification etc)
TODO: Support both forms of form-alter (since they run in different orders)
http://api.drupal.org/api/function/hook_form_alter/6
http://api.drupal.org/api/function/hook_form_FORM_ID_alter/6

lyricnz’s picture

PS: I've done more work on my local codebase, moving all the save settings OUT of drupal variables, and into a custom table - but that's not quite ready to commit. I won't be making a migration path between the two unless someone desperately wants it.

lyricnz’s picture

That version is committed, working on ctools exportables now.