Created
December 17, 2015 16:03
-
-
Save tobyontour/ca3bfb02d283b33ec07e to your computer and use it in GitHub Desktop.
Add a special template for an individual page of a multipage webform
This file contains hidden or 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
| function THEME_preprocess_webform_form(&$vars) { | |
| /* | |
| Add a special template for an individual page of a webform. | |
| e.g. for the first page of a webform with a node id of 12: webform-form-12-0.tpl.php | |
| */ | |
| $vars['theme_hook_suggestions'][] = $vars['theme_hook_suggestion']; | |
| $vars['theme_hook_suggestions'][] = 'webform_form_' . $vars['nid'] . '_' . $vars['form']['progressbar']['#page_num']; | |
| // The theme_hook_suggestion would override all suggestions so unset it. | |
| unset($vars['theme_hook_suggestion']); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment