February 2010
Atrium Casetracker: Change Which Case Statuses are "Closed"
grayside — Mon, 02/08/2010 - 13:35
You might wonder how cases are considered “closed” for purposes of case filtering in the Case Tracker. It’s an attempt to be helpful on the Case Tracker’s part– hide the stuff that is no longer relevant unless the user specifically asks for it. Unfortunately, I don’t like the defaults on what it considers irrelevant.
Overriding Prepopulate: Do Not Use hook_form_FORM_ID_alter
grayside — Fri, 02/12/2010 - 11:31
The Prepopulate module works some great magic to preload forms from URL variables. But suppose you need some extra magic to modify the titles it puts in place?
You can always use hook_form_alter (and here is one of countless little tutorials on that).
If you already know about that, you might be someone that enjoys the use of hook_form_FORM_ID_alter(). If you do, you cannot use it to override Prepopulate-set fields. It turns out that regardless of module weight, hook_form_FORM_ID_alter is called before hook_form_alter for any given form, meaning that the more specific function will always set the value, then Prepopulate will come along and reset it to your URL value.
There is a nice issue (#300481) that details this problem, and hopefully will find itself fixed in Drupal 8.