blob: e4894e7d352ea11966f7117304dea1eeb9b44a97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<?php
// $Id$
/**
* Change content creation form to remove "title" field for FWN
* beats. For that content type we will autocompute the results from
* the issue and beat number provided through CCK.
*/
function fedora_fwnbeat_node_form_validate($form, &$form_state) {
$form['title']['#value'] = 'FWN ' . $form['field_issue']['#value'] . ' ' .
$form['field_beat']['#value'];
}
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';
}
|