Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using a View to control access to prior Submissions, it would be nice to disable the "Results" features within the standard UI. As currently implemented, the "Results" feature is enabled when you allow users to view prior Submissions. You have to enable that access permission for the views to be able to see the data.
Thanks!
-Bart
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz commentedAre you looking for way to hide the 'Results' tab?
Comment #3
bartschaerrer CreditAttribution: bartschaerrer commentedYes. And, ideally, the related Results-type features like Previous/Next submission links when viewing a submission. If I'm providing the desired navigation through a View, I would prefer the end user not get confused by another path to access the submissions. Just a thought...
Thanks for the consideration!
Comment #4
bartschaerrer CreditAttribution: bartschaerrer commentedI'm trying to use forms in a way similar to articles. Once posted, I'd like all authenticated users to be able to review them. But I'd like to control how they do that. The default Results features are geared a bit too far towards system admins for my audience.
Comment #5
jrockowitz CreditAttribution: jrockowitz commentedHave you tried to overwrite the default Results path with the View's path? In D6 and D7 this was possible, I am not sure about D8.
Comment #6
bartschaerrer CreditAttribution: bartschaerrer commentedI'll check into that. Thanks!
Comment #7
jrockowitz CreditAttribution: jrockowitz commentedI checked and Views can't overwrite the tabs, you are going to have to write some custom code and place it in a custom module.
A few approaches..
- Use hook_menu_links_discovered_alter() to completely remove 'Results' and 'Submission' callbacks
- Use hook_local_tasks_alter() to alter the tabs.
- Use hook_menu_local_tasks_alter() to alter the tabs and remove the 'Table' and 'Submission' tab. (See below code example)
Comment #8
fenstratMoving to Webform queue, see #2827845: [roadmap] YAML Form 8.x-1.x to Webform 8.x-5.x.
Comment #9
jrockowitz CreditAttribution: jrockowitz commented