I am using Webform for surveys. But I want to permit users who have submitted to see all results. In other words: to see all Webform submissions.

Any user can submit but no user can't see all results without submission.

Any ideas or suggestions?

  • Do you have multiple webforms? If you have multiple webforms, do you only want the users to be able to see the results of the webforms that they have already submitted? Or, is it OK if a user submits one webform, and then can see the results of webforms he/she has not submitted? – Patrick Kenny Nov 30 '17 at 11:46

Here are the steps to get this to work:

  • Create a dedicated role, let's call it "WSA" (short for "Webform Submission Access"). By default, no user has this role.
  • Configure the permission "Access all webform results" so that only role WSA has access to it.
  • Install/enable the Rules and Webform Rules modules.
  • Create a, rather basic, rule like so:
    • Rules Event: After a webform has been submitted.
    • Rules Condition: Check that the current user has role "authenticated" (I trust you do not want Anonymous users to get access to the submissions ...). Add whatever other conditions you may want (eg: check the form-id), if any.
    • Rules Access: Grant access to the WSA role for the "current user" (who submitted the webform).

PS: I'm assuming this question is about D7.

  • Your solution is good for me. It is what I searched for longtime. Thank your very much. – SANDWIDI Dec 5 '17 at 12:12
  • @SANDWIDI merci (oeps: thank you) for the feedback (and "accept"). No "next question"? – Pierre.Vriens Dec 5 '17 at 12:20

Maybe not a complete solution but here is how you can start of

  • create a view that displays submissions
  • make it available to everyone (view has permissions)
  • put it in a URL that is not linked from your main site (its like being hidden but not exactly)
  • put the URL link at the submission completion page (thank you page)

beware this will not prevent a person that knows this URL to visit it and see the results. I am not aware at this point of a module that will give the required permission see results after submission or something similar so if the above is not to your satisfaction then you might want to create a module to do that or modify webform to include such a feature

  • Thank you very much for replying your solution is good but even user submits he can see all results because he will be redirects to the results page which contains all results but the main difficult here is to display the results to the user if he decides to come later and visit the surveys. – SANDWIDI Dec 5 '17 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.