hook form parse error

  1. /**
  2.  * Implementation of hook_form()
  3.  * TODO: title=hostname ip= file=tar.bz2 description=body disk size=(permissioned) memory size=(permissioned) swap size=(permissioned)
  4.  */
  5. function xen_node_form(&$node, &$param) {
  6. //  $type = node_get_types('type', $node);
  7.   $xen_node = $node->xen_node;
  8.  
  9.   $form['title'] = array(
  10.     '#type' => 'textfield',
  11.     '#title' => check_plain$type->title_label,
  12.     '#description' => t('Choose an unique hostname for this host. The hostname can contain alphabetical characters or numbers.'),
  13.     '#size' => 50,
  14.     '#maxlength' => 100,
  15.     '#required' => TRUE,
  16.     '#default_value' => $node->title,
  17.     '#weight' => -5,
  18.   );
  19.  
  20.   $form['body_filter']['body'] = array(
  21.     '#type' => 'textarea',
  22.     '#title' => $type->body_label,
  23.     '#required' => FALSE,
  24.     '#default_value' => $node->body,
  25.     '#rows' => 7,
  26.   );
  27.    
  28. //  $form['xen_node_options'] = array(
  29. //    '#title' => t('Xen Node Options'),
  30. //    '#type' => 'fieldset',
  31. //    '#description' => t('Options for the Xen node type.'),
  32. //    '#collapsible' => TRUE,
  33. //    '#collapsed' => FALSE,
  34. //    '#weight' => 1,
  35. //  );
  36.  
  37.   $form['disk'] = array(
  38.       '#type' => 'textfield',
  39.       '#title' => t('Disk size'),
  40.       '#default_value' => variable_get('xen_fs_size', '6'),
  41.       '#field_suffix' => t('GB'),
  42.       '#size' => 1,
  43.       '#maxlength' => 3,
  44. //      '#value' => intval(variable_get('xen_fs_size', '6')),
  45. //      '#disabled' => TRUE,
  46.       '#description' => t('Disk size. You can alter this only if you have sufficient privileges.'),
  47.       '#required' => TRUE,
  48.       );
  49.   $form['memory'] = array(
  50.       '#type' => 'textfield',
  51.       '#title' => t('Memory size'),
  52.       '#default_value' => variable_get('xen_mem_size', '128'),
  53.       '#field_suffix' => t('MB'),
  54.       '#size' => 2,
  55.       '#maxlength' => 4,
  56. //      '#value' => intval(variable_get('xen_mem_size', '128')),
  57. //      '#disabled' => TRUE,
  58.       '#description' => t('RAM size. You can alter this only if you have sufficient privileges.'),
  59.       '#required' => TRUE,
  60.       );
  61.   $form['swap'] = array(
  62.       '#type' => 'textfield',
  63.       '#title' => t('Swap size'),
  64.       '#default_value' => variable_get('xen_swap_size', '1024'),
  65.       '#field_suffix' => t('MB'),
  66.       '#size' => 2,
  67.       '#maxlength' => 4,
  68. //      '#value' => intval(variable_get('xen_swap_size', '1024')),
  69. //      '#disabled' => TRUE,
  70.       '#description' => t('Swap size. You can alter this only if you have sufficient privileges.'),
  71.       '#required' => TRUE,
  72.       );
  73.  
  74.   return $form;
  75. }