function chado_add_node_form_subtables_remove_button_submit

2.x chado_add_node_form_subtables_remove_button_submit($form, &$form_state)

Remove subtable entries to the node forms. Supported subtables: Properties, Relationships, Additional DBxrefs.



array $form:

3 string references to 'chado_add_node_form_subtables_remove_button_submit'
chado_add_node_form_dbxrefs in tripal_core/api/
Provides a form for adding to BASE_dbxref and dbxref tables
chado_add_node_form_properties in tripal_core/api/
chado_add_node_form_relationships in tripal_core/api/
Provides a form for adding to BASE_relationship and relationship tables


tripal_core/api/, line 276
API to handle much of the common functionality implemented when creating a drupal node type.


function chado_add_node_form_subtables_remove_button_submit($form, &$form_state) {

  // Based on triggering element call the correct submit function
  // ASUMPTION #1: each of the buttons must have properties, dbxrefs or relationships
  // as the first part of the #name to uniquely identify the subsection.
  if (preg_match('/^([a-z]+).*/', $form_state['triggering_element']['#name'], $matches)) {
    $subsection = $matches[1];

    switch ($subsection) {
      case 'properties':
        chado_add_node_form_properties_remove_button_submit($form, $form_state);
      case 'dbxrefs':
        chado_add_node_form_dbxrefs_remove_button_submit($form, $form_state);
      case 'relationships':
        chado_add_node_form_relationships_remove_button_submit($form, $form_state);

  // This is needed to ensure the form builder function is called for the node
  // form in order for any of these changes to be seen.
  $form_state['rebuild'] = TRUE;