Save and Retrieve Admin Settings from the database I created a config form in the admin/config page. (Just a link field that needs to be saved for later retrieval) Im confused as to how to save and retrieve the form data. 

When creating a custom form in a block I have been successful using:

variable_get('link_title', '')


However when creating a custom form it seems to require a different way. I attempted to save the data in hook_form_submit. However Im not sure how to retrieve when you return to the form at a later date.

function read_more_news_admin_form($form, &amp;$form_state) {
        $form = array();
        $form['link_container'] = array(
            '#type' =&gt; 'container',
            '#attributes' =&gt; array('class' =&gt; array('some-class')),
            '#tree' =&gt; TRUE,
        );
        $form['link_container']['link'] = array(
            '#type' =&gt; 'link_field',
            '#field_name' =&gt; 'link_field',
            '#language' =&gt; 'und',
            '#field_parents' =&gt; array(),
            '#delta' =&gt; 0,
            '#default_value' =&gt; array(
                'title' =&gt; variable_get('link_title', ''),
                'url' =&gt; variable_get('link_url', ''),
            ),
        );
        return system_settings_form($form);
    }

    function read_more_news_form_submit($form_id, $form_values) {
      drupal_write_record('readmorelink', $form_state['values']); 
    }
I don't know how system_settings_form will handle form elements of which the parent element has the tree property set. So it is best to go with a submit handler and do it yourself.

function read_more_news_admin_form($form, &amp;$form_state) {
  $form = array();
  $form['link_container'] = array(
    '#type' =&gt; 'container',
    '#attributes' =&gt; array('class' =&gt; array('some-class')),
    '#tree' =&gt; TRUE,
  );
  $form['link_container']['link'] = array(
    '#type' =&gt; 'link_field',
    '#field_name' =&gt; 'link_field',
    '#language' =&gt; 'und',
    '#field_parents' =&gt; array(),
    '#delta' =&gt; 0,
    '#default_value' =&gt; array(
      'title' =&gt; variable_get('link_title', ''),
      'url' =&gt; variable_get('link_url', ''),
    ),
  );
  $form['submit'] = array('#type' =&gt; 'submit', '#value' =&gt; t('Submit'));
  return $form;
}

function read_more_news_admin_form_submit(&amp;$form, &amp;$form_state) {
  variable_set('link_title', $form_state['values']['link_container']['link']['title']);
  variable_set('link_url', $form_state['values']['link_container']['link']['url']);
  //drupal_write_record('readmorelink', $form_state['values']);
}