function tripal_cv_cvterm_callback

1.x tripal_cv_admin.inc tripal_cv_cvterm_callback()

Purpose: This function gets called when the selecting of a cv from the select list triggers it. This function simply rebuilds the form with new information. No elements are created here

Related topics

1 string reference to 'tripal_cv_cvterm_callback'
tripal_cv_menu in tripal_cv/tripal_cv.module
Implements hook_menu(). Registers all menu items associated with this module

File

tripal_cv/includes/tripal_cv_admin.inc, line 521

Code

function tripal_cv_cvterm_callback() {
  $status = TRUE;

  // prepare and render the form
  $form = tripal_core_ahah_prepare_form();
  $data = drupal_render($form);

  // bind javascript events to the new objects that will be returned 
  // so that AHAH enabled elements will work.
  $settings = tripal_core_ahah_bind_events();

  // return the updated JSON
  drupal_json(
  array(
    'status' => $status,
    'data' => $data,
    'settings' => $settings,
  )
  );
}