Header(array('settings' => 'Settings', 'other' => 'Other', 'help' => 'Help'), 'autocomplete_processor_config_{n}'); ?>
tabStart('settings'); ?>
getTableList();
$options = array();
foreach($tables as $table){
$options[$table] = $table;
}
?>
input('action_autocomplete_processor_{n}_table_name_config', array('type' => 'select', 'label' => 'Table', 'options' => $options, 'empty' => " - ", 'class' => 'medium_input', 'smalldesc' => "The table name to load the data from.")); ?>
input('action_autocomplete_processor_{n}_field_name_config', array('type' => 'text', 'label' => "Field Name", 'smalldesc' => 'The name of the field which will be sent and its value will be queried against the table.')); ?>
input('action_autocomplete_processor_{n}_column_name_config', array('type' => 'text', 'label' => "Column name(s)", 'class' => 'medium_input', 'smalldesc' => 'The column name which will be searched for the data (should exist in the table selected above), you may enter more than 1 separated by comma and all of them will be searched.')); ?>
input('action_autocomplete_processor_{n}_content1_config', array('type' => 'textarea', 'label' => "Code", 'rows' => 20, 'cols' => 70, 'smalldesc' => 'You can place PHP code(with tags) here to override the results, check the help tab for how to.')); ?>
tabEnd(); ?>
tabStart('other'); ?>
input('action_autocomplete_processor_{n}_minLength_config', array('type' => 'text', 'label' => "Minimum length", 'smalldesc' => 'Minimum number of characters before a request is initiated.')); ?>
input('action_autocomplete_processor_{n}_maxChoices_config', array('type' => 'text', 'label' => "Max choice", 'smalldesc' => 'Maximum number of choices to load.')); ?>
input('action_autocomplete_processor_{n}_maxLength_config', array('type' => 'text', 'label' => "Max Length", 'smalldesc' => 'Maximum number for the string length.')); ?>
tabEnd(); ?>
tabStart('help'); ?>
- Fill the necessary fields and select your table, make sure that the field name matches the same field on the Autocomplete loader action.
- The column name is one of your selected table's columns.
- The code box can override the results loaded:
$form->data['_PLUGINS_']['autocomplete_processor']['data'] will hold the whole data association loaded from the database.
$form->data['_PLUGINS_']['autocomplete_processor']['result'] will hold the final 1 dimension array results which will be sent to the view.
You can use both variables to filter and/or add your own results.
- This action requires PHP5.
tabEnd(); ?>
PK ÷‘?\®)ÕÐ .htaccessnu W+A„¶