function chado_analysis_node_form_add_new_empty_props
1.x tripal_analysis.form.inc | chado_analysis_node_form_add_new_empty_props(&$form, $properties_select) |
1 call to chado_analysis_node_form_add_new_empty_props()
- chado_analysis_form in tripal_analysis/
includes/ tripal_analysis.form.inc - When editing or creating a new node of type 'chado_analysis' we need a form. This function creates the form that will be used for this.
File
- tripal_analysis/
includes/ tripal_analysis.form.inc, line 319
Code
function chado_analysis_node_form_add_new_empty_props(&$form, $properties_select) {
// add one more blank set of property fields
$form['properties']['table']['new']["new_id"] = array(
'#type' => 'select',
'#options' => $properties_select,
'#ahah' => array(
'path' => "tripal_analysis/properties/description",
'wrapper' => 'tripal-analysis-new_value-desc',
'event' => 'change',
'method' => 'replace',
),
);
$form['properties']['table']['new']["new_value"] = array(
'#type' => 'textarea',
'#default_value' => '',
'#cols' => 5,
'#rows' => $rows,
'#description' => '<div id="tripal-analysis-new_value-desc"></div>'
);
$form['properties']['table']['new']["add"] = array(
'#type' => 'image_button',
'#value' => t('Add'),
'#src' => drupal_get_path('theme', 'tripal') . '/images/add.png',
'#ahah' => array(
'path' => "tripal_analysis/properties/add",
'wrapper' => 'tripal-analysis-edit-properties-table',
'event' => 'click',
'method' => 'replace',
),
'#attributes' => array('onClick' => 'return false;'),
);
}