diff options
author | Paul W. Frields <stickster@gmail.com> | 2010-10-17 13:28:49 -0400 |
---|---|---|
committer | Paul W. Frields <stickster@gmail.com> | 2010-10-17 13:28:49 -0400 |
commit | 736cdd001593a97711769a25c4d51355e9f0f18a (patch) | |
tree | 5b246a0f5e5d371eef1a8de638c5b17a9ca9e906 /fedora.module | |
parent | c33b8924646c08e088e978de980eee1b64fe9537 (diff) | |
download | drupal-fedora-hooks-736cdd001593a97711769a25c4d51355e9f0f18a.tar.gz drupal-fedora-hooks-736cdd001593a97711769a25c4d51355e9f0f18a.tar.xz drupal-fedora-hooks-736cdd001593a97711769a25c4d51355e9f0f18a.zip |
Hide title field and use array_unshift to add new validation hook
Diffstat (limited to 'fedora.module')
-rw-r--r-- | fedora.module | 6 |
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'); } |