function template_preprocess_webform_share_script in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_share/webform_share.module \template_preprocess_webform_share_script()
Prepares variables for webform share script templates.
Default template: webform-share-script.html.twig.
Parameters
array $variables: An associative array containing:
- element: An associative array containing the properties of the element. Properties used: #webform, #javascript, #options, and #attributes.
File
- modules/
webform_share/ webform_share.module, line 322 - Allows webforms to be shared on other websites using an iframe.
Code
function template_preprocess_webform_share_script(array &$variables) {
$element = $variables['element'];
$variables['script'] = $element['#script'];
}