Tripal Plant PopGen Submit
page_2_ajax.php File Reference

Go to the source code of this file.

Functions

 tpps_date_month_callback (array &$form, array $form_state)
 
 tpps_date_year_callback (array &$form, array $form_state)
 
 tpps_study_type_callback (array &$form, array $form_state)
 

Detailed Description

Defines the ajax functions necessary for the second page of the form.

Definition in file page_2_ajax.php.

Function Documentation

◆ tpps_date_month_callback()

tpps_date_month_callback ( array &  $form,
array  $form_state 
)

Ajax callback for the ending month field.

This function indicates the element to be updated after the starting month or the ending year field has been changed.

Parameters
array$formThe form to be updated.
array$form_stateThe state of the form to be updated.
Returns
array The element in the form to be updated.

Definition at line 40 of file page_2_ajax.php.

40  {
41  return $form['EndingDate']['month'];
42 }

◆ tpps_date_year_callback()

tpps_date_year_callback ( array &  $form,
array  $form_state 
)

Ajax callback for the ending year field.

This function indicates the element to be updated after the starting year field has been changed.

Parameters
array$formThe form to be updated.
array$form_stateThe state of the form to be updated.
Returns
array The element in the form to be updated.

Definition at line 22 of file page_2_ajax.php.

22  {
23  return $form['EndingDate']['year'];
24 }

◆ tpps_study_type_callback()

tpps_study_type_callback ( array &  $form,
array  $form_state 
)

Ajax callback for study type.

This function updates the study_info fieldset when the study type dropdown menu element is changed.

Parameters
array$formThe form being updated.
array$form_stateThe state of the form being updated.
Returns
array The part of the form to be updated.

Definition at line 58 of file page_2_ajax.php.

58  {
59  return $form['study_info'];
60 }