function theme_webform_advanced_submit_limit_form in Webform 6.3
Same name and namespace in other branches
- 5.2 webform.module \theme_webform_advanced_submit_limit_form()
- 6.2 webform.module \theme_webform_advanced_submit_limit_form()
- 7.4 includes/webform.pages.inc \theme_webform_advanced_submit_limit_form()
- 7.3 includes/webform.pages.inc \theme_webform_advanced_submit_limit_form()
Theme the submit limit fieldset on the webform node form.
1 theme call to theme_webform_advanced_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 359 - Menu callbacks and functions for configuring and editing webforms.
Code
function theme_webform_advanced_submit_limit_form($form) {
$form['submit_limit']['#attributes']['class'] = 'webform-set-active';
$form['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['submit_limit'])),
'!timespan' => preg_replace('/(<div[^>]*>)(.*?)(<\\/div>)/s', '$2', drupal_render($form['submit_interval'])),
);
$form['enforce_limit']['yes']['#title'] = t('Limit each user to !count submission(s) !timespan', $replacements);
return drupal_render($form);
}