You are here

function theme_webform_email_add_form in Webform 6.3

Same name and namespace in other branches
  1. 7.4 includes/webform.emails.inc \theme_webform_email_add_form()
  2. 7.3 includes/webform.emails.inc \theme_webform_email_add_form()

Theme the add new e-mail settings form on the node/x/webform/emails page.

1 theme call to theme_webform_email_add_form()
webform_emails_form in includes/webform.emails.inc
Overview form of all components for this webform.

File

includes/webform.emails.inc, line 133
Provides interface and database handling for e-mail settings of a webform.

Code

function theme_webform_email_add_form($form) {

  // Add a default value to the custom e-mail textfield.
  $form['email_custom']['#attributes']['rel'] = t('email@example.com');
  $form['email_custom']['#attributes']['class'] = 'webform-set-active webform-default-value';
  $form['email_option']['custom']['#title'] = $form['email_option']['custom']['#title'] . ': ' . drupal_render($form['email_custom']);

  // Render the component value.
  $form['email_component']['#attributes']['class'] = 'webform-set-active';
  $form['email_option']['component']['#title'] = $form['email_option']['component']['#title'] . ': ' . drupal_render($form['email_component']);

  // For spacing consistency, every option is wrapped in webform-container-inline.
  foreach (element_children($form['email_option']) as $option) {
    $form['email_option'][$option]['#prefix'] = '<div class="webform-container-inline">';
    $form['email_option'][$option]['#suffix'] = '</div>';
  }
  return drupal_render($form);
}