How to create a form on settings o settings page
My solution is for Drupal 7.

To add two textfields to the settings you have to implement the following hook:

function themename_form_system_theme_settings_alter(&amp;$form, &amp;$form_state) {

  $form['theme_settings']['socialmaintenaceurl'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('Social maintenance URL'),
    '#default_value' =&gt; theme_get_setting('socialmaintenaceurl'),
  );
  $form['theme_settings']['maintenaceurltext'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('Maintenance URL text'),
    '#default_value' =&gt; theme_get_setting('maintenaceurltext'),
  );
}


You have to replace themename in the function name with the name of the theme. 
The declaration of the input elements is based on the Drupal 7 Form API (https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7).

It is an array, which will be rendered according to the information you provide. Normally, keys starting with # are information to control the render process. For example: If you choose a different #type it gets a different widget/appearance in the form.

The $form['theme_settings'] should place the two new fields into the existing theme settings group.

If you want, you could ship default values for your two fields. You only need to add a few lines in you themes .info file:

settings[socialmaintenaceurl] = https://twitter.com/test
settings[maintenaceurltext] = Get the latest news on Twitter


I am not sure, if you need quotation marks around them, but I think in the .info file you dont need them.

To get these values in another file, you would need to use

theme_get_setting('maintenaceurltext')
theme_get_setting('socialmaintenaceurl').