summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2010-10-17 13:28:49 -0400
committerPaul W. Frields <stickster@gmail.com>2010-10-17 13:28:49 -0400
commit736cdd001593a97711769a25c4d51355e9f0f18a (patch)
tree5b246a0f5e5d371eef1a8de638c5b17a9ca9e906
parentc33b8924646c08e088e978de980eee1b64fe9537 (diff)
downloaddrupal-fedora-hooks-736cdd001593a97711769a25c4d51355e9f0f18a.zip
drupal-fedora-hooks-736cdd001593a97711769a25c4d51355e9f0f18a.tar.gz
drupal-fedora-hooks-736cdd001593a97711769a25c4d51355e9f0f18a.tar.xz
Hide title field and use array_unshift to add new validation hook
-rw-r--r--fedora.module6
1 files changed, 4 insertions, 2 deletions
diff --git a/fedora.module b/fedora.module
index 5bb4e06..3703b75 100644
--- a/fedora.module
+++ b/fedora.module
@@ -17,6 +17,8 @@ function fedora_fwnbeat_node_form_validate($form, &$form_state) {
function fedora_form_fwnbeat_node_form_alter(&$form, $form_state) {
// In the FWN beat content entry form, remove the title field
- $form['title']['#access'] = false;
- $form['#validate'][] = 'fedora_fwnbeat_node_form_validate';
+ $form['title']['#type'] = 'hidden';
+ $form['title']['#value'] = NULL;
+ $oldval = $form['#validate'];
+ $form['#validate'] = array_unshift($oldval, 'fedora_fwnbeat_node_form_validate');
}