1, 'garland_shoes' => 0, ); // Merge the saved variables and their default values $settings = array_merge($defaults, $saved_settings); // Create the form using Form API $form['garland_happy'] = array( '#type' => 'checkbox', '#title' => t('Get happy'), '#default_value' => $settings['garland_happy'], ); $form['garland_shoes'] = array( '#type' => 'checkbox', '#title' => t('Use ruby red slippers'), '#default_value' => $settings['garland_shoes'], ); // Return the form return $form; }