public function FrxFieldTable::configForm in Forena Reports 7.4
Template configuration form @parmater $configuration form
Overrides FrxRenderer::configForm
File
- renderers/
FrxFieldTable.inc, line 93 - FrxFieldTable Template that displays a table of column/value vertically.
Class
- FrxFieldTable
- @file FrxFieldTable Template that displays a table of column/value vertically.
Code
public function configForm($config) {
// Load header informationi from parent config.
$form = parent::configForm($config);
$this
->weight_sort($config['columns']);
$form['columns'] = array(
'#theme' => 'forena_element_draggable',
'#draggable_id' => 'FrxTable-columns',
);
foreach ($config['columns'] as $key => $col) {
$ctl = array();
$ctl['label'] = array(
'#type' => 'textfield',
'#size' => 30,
'#title' => t('Label'),
'#default_value' => $col['label'],
);
$ctl['contents'] = array(
'#type' => 'textfield',
'#size' => '30',
'#title' => t('Data'),
'#default_value' => $col['contents'],
);
$ctl['include'] = array(
'#type' => 'checkbox',
'#title' => t('Include'),
'#default_value' => $col['include'],
'#ajax' => $this
->configAjax(),
);
$ctl['weight'] = array(
"#type" => 'weight',
'#title' => t('Weight'),
'#delta' => 50,
'#default_value' => $col['weight'],
);
$form['columns'][$key] = $ctl;
}
return $form;
}