Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jrockowitz created an issue. See original summary.

  • jrockowitz committed 2358e6d on 2887078-customize-preview
    Issue #2887078: Allows preview page to customized.
    
jrockowitz’s picture

Status: Active » Needs review
FileSize
100.32 KB

  • jrockowitz committed 091443d on 8.x-5.x
    Issue #2887078 by jrockowitz: Allows preview page to customized
    
jrockowitz’s picture

Status: Needs review » Fixed
jrockowitz’s picture

Title: Allows preview page to customized » Allows preview page to be customized
frankdesign’s picture

jrockowitz

Thanks for adding this to webform. I presume to style the preview page, I need to use webform-preview.html.twig? The comments in that file would imply that styling possibilities are quite limited - is it possible to style individual fields within the Preview page? If so, can you point me in the right direction to do that?

Also, has it been added to 8.x-5.0-beta13?

Thanks

Frank

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

doxigo’s picture

Sorry for re-opening this task, but I was thinking if we could actually add a field to preview page, for instance, if we could actually add a "Accept TOS" field to preview page would be nice.

jrockowitz’s picture

To add TOS you would to build a custom preview page using a computed element with a TOS checkbox.

doxigo’s picture

Thanks for the answer, may I ask how can we build a custom preview page?

doxigo’s picture

Hey there again,
I was wondering if it's possible to customize the output of preview page, so far I noticed the data is being rendered with <b> and <br> tags with no proper wrapper class or item classes and it's almost impossible to style it properly.

Thanks

jrockowitz’s picture

Status: Closed (fixed) » Needs work
jrockowitz’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

bgilhome’s picture

A note regarding this issue: looks like it was reworked in https://www.drupal.org/project/webform/issues/2911463 such that the preview page now renders the submission entity in 'preview' view mode - therefore it can be templated using webform-submission--preview.html.twig, or a more specific template using usual entity template suggestions.