function epub_form in Epub 6
Implementation of hook_form().
File
- ./
epub.module, line 129 - Provide ePub content type and enable the creation of ePub files from book contents.
Code
function epub_form(&$node) {
$type = node_get_types('type', $node);
$form = array();
if ($type->has_title) {
$form['title'] = array(
'#type' => 'textfield',
'#title' => check_plain($type->title_label),
'#required' => TRUE,
'#default_value' => $node->title,
'#weight' => -5,
);
}
if ($type->has_body) {
$form['body_field'] = node_body_field($node, $type->body_label, $type->min_word_count);
}
_epub_add_form_elements($form, $node);
return $form;
}