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' );| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2985432-5.patch | 5.26 KB | jrockowitz |
| #4 | Screen Shot 2018-07-12 at 5.50.59 PM.png | 337.84 KB | jrockowitz |
Comments
Comment #2
wturrell commentedComment #3
wturrell commentedComment #4
jrockowitz commentedI 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.
Comment #5
jrockowitz commentedThe 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.
Comment #7
jrockowitz commentedI committed the patch. Please download the latest dev release to review.
Comment #8
wturrell commentedThank you - tested and all seems to work.