function isbn_form_submit in ISBN Field 6.0
1 string reference to 'isbn_form_submit'
- isbn_form in ./
isbn.module
File
- ./
isbn.module, line 198 - Maintains a consistant relationship between nodes and ISBNs.
Code
function isbn_form_submit($form, $form_state) {
$field = $form_state['values']['isbn'];
if ($field) {
$isbn = isbn_clean_field($field);
}
$isbns = isbn_build_isbns($isbn);
drupal_set_message('10 digit ISBN ' . $isbns['isbn10']);
drupal_set_message('13 digit ISBN ' . $isbns['isbn']);
if (isbn_check_10($isbns['isbn10'])) {
drupal_set_message('Valid ISBN 10');
}
if (isbn_check_13($isbns['isbn'])) {
drupal_set_message('Valid ISBN 13');
}
}