function biblio_form_submit in Bibliography Module 7.2
Process data that was submitted from the biblio add form. This handles the additions of Biblio and Contributor entities.
@global type $user
Parameters
type $form:
array $form_state:
1 string reference to 'biblio_form_submit'
- biblio_form in ./
biblio.module - Displays the Add/Edit form for a biblio entity
File
- ./
biblio.module, line 2989
Code
function biblio_form_submit($form, &$form_state) {
global $user;
module_load_include('inc', 'biblio', 'includes/biblio.contributors');
// Pull the old biblio object out of the $form_state variable.
$biblio =& $form_state['biblio'];
// Set the biblio's uid if it's being created at this time.
if (empty($biblio->uid)) {
$biblio->uid = $user->uid;
}
biblio_create_contributor_refs($form_state);
// Notify field widgets.
field_attach_submit('biblio', $biblio, $form, $form_state);
// Save the biblio.
biblio_save($biblio);
// Notify the user.
drupal_set_message(t('Biblio saved.'));
$form_state['redirect'] = 'biblio/' . $biblio->bid;
}