How to retrieve form entry for use as default value?
$form['savings_ages']['savings_age21'] = array(
'#type' =&gt; 'textfield',
'#title' =&gt; t('21'),
'#size' =&gt; 10,
'#maxlength' =&gt; 10,
'#default_value' =&gt; $whatgoeshere?,
);


I guess $form['savings_ages'] is a fieldset. If so, then you can use the following code to get the default value that was saved in database during previous edit.

Explanation

When you save a form, a variable gets created with the id that you use to create form element. In your case variable_get('savings_age21', '') will fetch the previously saved value.

Documentation variable_get

Edit

$form['savings_ages']['savings_age21'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('21'),
    '#size' =&gt; 10,
    '#maxlength' =&gt; 10,
    '#default_value' =&gt; variable_get('savings_age21', ''),
);

return system_settings_form($form);


Sorry, I forgot about system_settings_form($form), this way when you save the form a variable with id of form element will get created, later you can retrieve it using variable_get().

If you do not wish to use system_settings_form($form), then you can use variable_set() to save a variable with any name. You have to do this variable_set() inside the submit handler of the form. Later while displaying the form, use the same logic variable_get() to retrieve the variable.