This patch creates 2 separate functions, removes the form_alter and and moves functionality to these 2 new functions.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Spleshka’s picture

Hi,

What is the reason of this changes?

Rob C’s picture

I like to have as little as possible statements, and the exact same thing is possible via hooks, no if then else required. (and it looks a bit cleaner, especially when you want to expand the module at some point).

I try to use hook_form_alter() only when i really need to, for the node edit form and such, i put all others in their respected hook_form_FORM_ID_alter() functions. (except when it's not possible obviously).

Spleshka’s picture

Status: Needs review » Closed (won't fix)

So if this change is not breaks any module logic, I suppose this issue could be closed.