function chado_contact_node_form_add_new_empty_props

1.x tripal_contact.form.inc chado_contact_node_form_add_new_empty_props(&$form, $properties_select)
1 call to chado_contact_node_form_add_new_empty_props()
chado_contact_form in tripal_contact/includes/tripal_contact.form.inc
Implementation of tripal_contact_form().

File

tripal_contact/includes/tripal_contact.form.inc, line 189

Code

function chado_contact_node_form_add_new_empty_props(&$form, $properties_select) {

  // add one more blank set of property fields
  $form['properties']['new']["new_id"] = array(
    '#type' => 'select',
    '#options' => $properties_select,
    '#ahah' => array(
      'path' => "tripal_contact/properties/description",
      'wrapper' => 'tripal-contact-new_value-desc',
      'event' => 'change',
      'method' => 'replace',
    ),
  );
  $form['properties']['new']["new_value"] = array(
    '#type' => 'textarea',
    '#default_value' => '',
    '#cols' => 5,
    '#rows' => $rows,
    '#description' => '<div id="tripal-contact-new_value-desc"></div>'
  );
  $form['properties']['new']["add"] = array(
    '#type' => 'image_button',
    '#value' => t('Add'),
    '#src' => drupal_get_path('theme', 'tripal') . '/images/add.png',
    '#ahah' => array(
      'path' => "tripal_contact/properties/add",
      'wrapper' => 'tripal-contact-edit-properties-table',
      'event' => 'click',
      'method' => 'replace',
    ),
    '#attributes' => array('onClick' => 'return false;'),
  );
}