Closed (fixed)
Project:
Webform
Version:
6.x-3.14
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Dec 2011 at 21:40 UTC
Updated:
13 May 2012 at 03:55 UTC
I would like to display a block underneath of all webforms. But, I am using page break form components to turn a few of the forms into multi-page forms, and I only want to show the block on the last page of those forms. Is this possible? I was looking into using php code in the block visibility settings, but can't figure out what to do. Does anyone else have any code snippets I could use?
Comments
Comment #1
quicksketchAs mentioned in the submission guidelines:
So let's not get into PHP snippets here.
I don't think there's any (good) way you can put a block on just the last page of a Webform. Considering people can go back and forth between pages, calculating the last page can be challenging. What I would suggest instead (if this is an option) is to add a "Markup" component to the last page of your form and include your block content there (hopefully as plain HTML, but you can use the PHP input format there if really needed).
Or the most correct way to handle this problem would be to theme the form with a webform-form.tpl.php file (as documented in THEMING.txt). If you take that approach you can figure out which page you're on by checking $form['details'], but again, custom coding it outside the discussion of the Webform issue queue.
Comment #2
quicksketchClosing after lack of activity.