1, ); // Merge the variables and their default values $variables = array_merge($defaults, $variables); // Create the form using Form API $form['example_credits'] = array( '#type' => 'checkbox', '#title' => t('Show credits'), '#default_value' => $variables['example_credits'], ); // Return the form return $form; }