You are here

function theme_webform_email_add_form in Webform 7.3

Same name and namespace in other branches
  1. 6.3 includes/webform.emails.inc \theme_webform_email_add_form()
  2. 7.4 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($variables) {
  $form = $variables['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';
  $form['email_custom']['#attributes']['class'][] = 'webform-default-value';
  $form['email_option']['custom']['#theme_wrappers'] = array(
    'webform_inline_radio',
  );
  $form['email_option']['custom']['#inline_element'] = drupal_render($form['email_custom']);

  // Render the component value.
  $form['email_component']['#attributes']['class'][] = 'webform-set-active';
  $form['email_option']['component']['#theme_wrappers'] = array(
    'webform_inline_radio',
  );
  $form['email_option']['component']['#inline_element'] = drupal_render($form['email_component']);
  return drupal_render_children($form);
}