You are here

function certificate_form in Certificate 7.2

Same name and namespace in other branches
  1. 8.3 certificate.module \certificate_form()
  2. 6.2 certificate.module \certificate_form()
  3. 6 certificate.module \certificate_form()
  4. 7.3 certificate.module \certificate_form()
  5. 3.x certificate.module \certificate_form()

Certificate node form.

File

./certificate.module, line 32
Certificate module.

Code

function certificate_form(&$node, $form_state) {
  $form = node_content_form($node, $form_state);
  $form['certificate']['#tree'] = TRUE;
  $form['certificate']['orientation'] = array(
    '#type' => 'radios',
    '#title' => t('Orientation'),
    '#default_value' => isset($node->certificate['orientation']) ? $node->certificate['orientation'] : '',
    '#options' => array(
      'portrait' => t('Portrait'),
      'landscape' => t('Landscape'),
    ),
    '#required' => TRUE,
    '#description' => t('The orientation of the generated certificate.'),
  );
  $form['options']['status']['#default_value'] = 0;
  $form['options']['promote']['#default_value'] = 0;
  return $form;
}