I am allowing 2 submission per user every 24 hours and I want to inform the user how many time is remaining before the next submission using: [webform_submission:interval:user:wait]

Submissions Per User

But the token is not printed in the output:

Output

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

C.E.A created an issue. See original summary.

jrockowitz’s picture

Status: Active » Postponed (maintainer needs more info)

The attached test webform works as expected.

Please provide the steps and/or an example webform which can be used to reproduce this issue.

C.E.A’s picture

Category: Support request » Feature request
Status: Postponed (maintainer needs more info) » Needs work

The administrator can always see the value of the [webform_submission:interval:user:wait] token but for other anonymous and authenticated users on the site, the permission View any webform submission must be given to any role in order for the token value to be displayed for the user.

However, this permission will end up showing a new tab "Results" on the webform page which will allow the current user to see a list of all and own submissions... and this does not really make any sense !

Why in order to display for the user how many time is remaining before the next submission, I will be obliged to give him access to the list of all and own submissions.

is it possible to show the token value for any role without giving them this permission ?

It is really important and logic feature !!

jrockowitz’s picture

Status: Needs work » Postponed (maintainer needs more info)
FileSize
4.9 KB

The attached example webform works for anonymous users

C.E.A’s picture

Status: Postponed (maintainer needs more info) » Needs work
FileSize
11.04 KB
11.35 KB

Tested the attached webform with anonymous user and got the below results:

Test Result 2

However, when tested the attached webform with authenticated user (Not Administrator), i got the below results:

Test Result 1

Kindly note that all permissions for Webform, Webform Node, Webform Submission Log, Webform Templates are unchecked for all roles including anonymous and authenticated roles (Excluding Administrator Role of course)

Thank you,

jrockowitz’s picture

Status: Needs work » Needs review
FileSize
751 bytes

Please review the attached patch.

C.E.A’s picture

Patch #6 is working as expected,
Thank you for your help !

  • jrockowitz authored 7d6c466 on 8.x-5.x
    Issue #3131667 by jrockowitz, C.E.A: [webform_submission:interval:user:...
jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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