All the select combo boxes, checkboxes, textboxes, etc get their code hammered out from functions which have overrides in themes and modules. Abbreviations used in select combo boxes are explained in the FA Glossary.

Files that manage UI code in FA


This file has the various functions to generate the user interface (UI) form elements of the select combo type. The universal ones are:

  • SQL combo Generator: function combo_input($name, $selected_id, $sql, $valfield, $namefield, $options=null)
  • Array Combo Generator: function array_selector($name, $selected_id, $items, $options=null)

All combo boxes used in FA are generated in separate functions here based on the above functions. Examples are:

  • function customer_list($name, $selected_id=null, $spec_option=false, $submit_on_change=false, $show_inactive=false, $editkey = false)
  • function customer_branches_list($customer_id, $name, $selected_id=null, $spec_option = true, $enabled=true, $submit_on_change=false, $editkey = false)

An example of how a combo box is built using other functions specific to the element inside the universal functions is:

function currencies_list($name, $selected_id=null, $submit_on_change=false)
	$sql = "SELECT curr_abrev, currency, inactive FROM ".TB_PREF."currencies";

// default to the company currency
return combo_input($name, $selected_id, $sql, 'curr_abrev', 'currency',
		'select_submit'=> $submit_on_change,
		'default' => get_company_currency(),
		'async' => false		
	) );

function currencies_list_cells($label, $name, $selected_id=null, $submit_on_change=false)
	if ($label != null)
		echo "
	echo "
	echo currencies_list($name, $selected_id, $submit_on_change);
	echo "\n";

function currencies_list_row($label, $name, $selected_id=null, $submit_on_change=false)
	echo "
(:cellnr class='label':)$label";
	currencies_list_cells(null, $name, $selected_id, $submit_on_change);
	echo "\n";

Theme Dependencies

Module Overrides

Usage in Report Forms

  • All Reports in FA get their parameters from reporting/reports_main.php.
  • These parameters are taken from form fields whose combo select boxes are generated from the functions in includes/ui/
  • The arguments to these functions are provided through reporting/includes/