i need help. the following code is only working partly and i don't understand why. the "test_display" is saved well in variable table and after a reload of the module page the field is filled with the DB data. all ok here...
But if it comes to the "testVar1", this value is saved in variable table, but the field will never populate with the value if i reload the modules page. what is wrong here?
<?php
function test_settings() {
$prefix='test';
$form[$prefix] = array(
'#type' => 'fieldset',
'#title' => t('Global settings'),
'#collapsible' => true,
'#collapsed' => false,
);
$form[$prefix][$prefix.'_display'] = array(
'#type' => 'checkbox',
'#title' => t('enable/disable the test output'),
'#default_value' => variable_get($prefix.'_display', NULL),
'#description' => t('enable/disable the test output'),
);
$properties = array(
$prefix.'_test1' => t('Test 1'),
$prefix.'_test2' => t('Test 2'),
$prefix.'_test3' => t('Test 3'),
);
// Build the form for detailed settings
foreach ($properties as $a => $b) {
$form[$a] = array(
'#type' => 'fieldset',
'#title' => t('Array of properties for '.$b.' link'),
'#collapsible' => true,
'#collapsed' => true,
'#tree' => true,
);
$form[$a]['testVar1'] = array(
'#type' => 'textfield',
'#title' => t('Suboutput Test 1'),