0

Possible Duplicate:
How to list all the form IDs

I have been searching for a way of listing all forms that are hooked to a Drupal site. I have read this post How to list all the form IDs, saying that it is impossible.

Now impossible is a big word in my vocabulary;-) If need be I can scan every single module file for the hook_form () function. Yet I am seriously hoping there will be a less hack like solution no matter what the resource cost might be. Any suggestions?

2
  • 3
    Out of curiosity, why do you need this list?
    – Clive
    Aug 10 '12 at 22:58
  • I have a assignment at work that requires me to list all forms through the Servises REST server so they can be used as content in steps for a BPM engine. Since my boss here is not easily convinced that we should deviated from the plan...well I'm stuck with this. Aug 11 '12 at 11:23
0

Well I ended up using Hook_form_alter () to add every form that was being called (and was not on my form list yet) to a form list.

Then I wrote an admin interface that enables the administrator to select what forms are still active/should be listed. Next to this I implemented a REST service for the Services module to GET the list of forms.

The fact that the hook_form_alter () has to preform a DB request to see if the form is on the list everytime a form is viewed is some what performance heavy, but since there is no help, this is the best I can think of. If anyone has interest in the code, drop me a line, ofcourse better ideas are welcome;-)

Not the answer you're looking for? Browse other questions tagged or ask your own question.