Created
April 14, 2014 14:15
-
-
Save StryKaizer/10652041 to your computer and use it in GitHub Desktop.
webform fix tokens
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_template_preprocess | |
* | |
* - Webform 3 ondersteund geen tokens in submission page, dit zorgt ervoor dat we wel tokens kunnen gebruiken. | |
*/ | |
function hook_preprocess_webform_confirmation(&$vars) { | |
$confirmation = check_markup($vars['node']->webform['confirmation'], $vars['node']->webform['confirmation_format'], '', TRUE); | |
module_load_include('inc', 'webform', 'includes/webform.submissions'); | |
$submission = webform_get_submission($vars['node']->nid, $vars['sid']); | |
$confirmation = _webform_filter_values($confirmation, $vars['node'], $submission, NULL, FALSE, TRUE); | |
// Strip out empty tags added by WYSIWYG editors if needed. | |
$vars['confirmation_message'] = strlen(trim(strip_tags($confirmation))) ? $confirmation : ''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment