You are here

function theme_webform_advanced_total_submit_limit_form in Webform 6.3

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

Theme the total submit limit fieldset on the webform node form.

1 theme call to theme_webform_advanced_total_submit_limit_form()
webform_configure_form in includes/webform.pages.inc
Main configuration form for editing a webform node.

File

includes/webform.pages.inc, line 374
Menu callbacks and functions for configuring and editing webforms.

Code

function theme_webform_advanced_total_submit_limit_form($form) {
  $form['total_submit_limit']['#attributes']['class'] = 'webform-set-active';
  $form['total_submit_interval']['#attributes']['class'] = 'webform-set-active';

  // Remove div wrappers around limit options.
  $replacements = array(
    '!count' => preg_replace('/(<div[^>]*>)(.*?)(<\\/div>)/s', '$2', drupal_render($form['total_submit_limit'])),
    '!timespan' => preg_replace('/(<div[^>]*>)(.*?)(<\\/div>)/s', '$2', drupal_render($form['total_submit_interval'])),
  );
  $form['enforce_total_limit']['yes']['#title'] = t('Limit to !count total submission(s) !timespan', $replacements);
  return drupal_render($form);
}