summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2010-10-17 13:27:30 -0400
committerPaul W. Frields <stickster@gmail.com>2010-10-17 13:27:30 -0400
commitc33b8924646c08e088e978de980eee1b64fe9537 (patch)
treec517e6fd2c5d935e408a610d8ee677d043300a79
parent4f0d0049c854f94ea8a7cf54004c1971959a5e7d (diff)
downloaddrupal-fedora-hooks-c33b8924646c08e088e978de980eee1b64fe9537.zip
drupal-fedora-hooks-c33b8924646c08e088e978de980eee1b64fe9537.tar.gz
drupal-fedora-hooks-c33b8924646c08e088e978de980eee1b64fe9537.tar.xz
Reset title more explicitly and give confirmation
-rw-r--r--fedora.module7
1 files changed, 5 insertions, 2 deletions
diff --git a/fedora.module b/fedora.module
index e4894e7..5bb4e06 100644
--- a/fedora.module
+++ b/fedora.module
@@ -8,8 +8,11 @@
*/
function fedora_fwnbeat_node_form_validate($form, &$form_state) {
- $form['title']['#value'] = 'FWN ' . $form['field_issue']['#value'] . ' ' .
- $form['field_beat']['#value'];
+ $newtitle = 'FWN ' . $form['field_issue']['#value'] . ' ' . $form['field_beat']['#value'];
+ $form_set_value($form['title'], $newtitle, &$form_state);
+ $form_state['rebuild'] = TRUE;
+ drupal_set_message('Created beat with title '.$newtitle);
+ return TRUE;
}
function fedora_form_fwnbeat_node_form_alter(&$form, $form_state) {