Posted by ArthurC on February 2, 2013 at 2:18am
I'm using WebForm to build a list of people, in Drupal 7. I want to display the number of submissions to folks. Not the content of each submission, just the total number of submissions. I have a View that displays this count to me - the administrator - but the View shows zero for anonymous visitors. Any suggestions? Can I do this in Views? Something I need to do in Permissions? Do I need to do this in code?
Comments
Under the advanced settings
Under the advanced settings you can click on 'Query Settings' and check the box to disable SQL rewriting. That will disable node access calls and may give you the info you want.
I'm unique, just like everybody else.
If I helped, please pay it forward, backward or sidelong.
No luck in advanced settings
I tried your suggestion, NotGoddess, but it made no difference. I could possibly create a tpl.php. I may have to create one. But truthfully, I'd spend hours trying to figure out what code to put into it. If it's a permissions thing, is it possible that by the time the process got to the custom template file, the permissions code would already have set the value I need, to zero.
If I were just writing SQL, I'd write:
SELECT count( sid ) AS TotalSubmissions FROM `webform_submissions` WHERE nid = X;Sometimes you need to take an
Sometimes you need to take an end-run around the permissions to get what you want. That'll do it- maybe just whip up a custom module to display the block so you can have caching & your own permissions in place. That way you won't need to enable the PHP input filter.
See the examples module if you need help making it.
I'm unique, just like everybody else.
If I helped, please pay it forward, backward or sidelong.