I assume it's not uncommon to have complicated webform submissions that look far clearer/"cleaner" in Table view, rather than HTML; the former is more like reading two columns of a spreadsheet so it's easier to scan the fields. Also Table view lacks strips out display elements like header tags and horizontal rules.

It'd help to be able to set Table (or a format of your choice) as the default (probably on a per-form basis?), when:

a) clicking the 'View' tab in /admin/webform/manage/[form]/submission/[sid]
b) clicking submission table row in /admin/structure/webform/manage/[form]/results/submissions

For b), maybe even allow people to jump straight to 'Edit' when accessing a submission.

For the site I'm building, I've worked around this within a RouteSubscriber (not perfect as secondary tabs aren't correct):

if ($route = $collection->get('entity.webform_submission.canonical')) {
  // change view_mode from 'html'
  $route->setDefault( 'view_mode', 'table' );

Comments

wturrell created an issue. See original summary.

wturrell’s picture

Issue summary: View changes
wturrell’s picture

Issue summary: View changes
jrockowitz’s picture

StatusFileSize
new337.84 KB

I am not sure this feature is really needed since it is easy to do using custom code.

Still, it would be pretty easy to add a 'View submission as...' HTML|Table|Text to the 'Customize Result' dialog.

jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new5.26 KB

The attached patch allows admins to decide if the HTML or Table view should be linked to for submissions.

The Edit link is already available as the first item in the operations dropdown.

  • jrockowitz committed 0327ed6 on 8.x-5.x
    Issue #2985432 by jrockowitz: Configurable default submission view...
jrockowitz’s picture

Status: Needs review » Fixed

I committed the patch. Please download the latest dev release to review.

wturrell’s picture

Thank you - tested and all seems to work.

Status: Fixed » Closed (fixed)

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