If webform was configured to allow only 1 submission per user it shows an error message of user already submitted this form:
"You have already submitted this form. View your previous submissions."
But it's not an error and this message should be "green" (type should be 'status').
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | webform-messages_about_limits-2453687-9.patch | 1.08 KB | danchadwick |
| #3 | webform-change-messages-type-2453687-2.patch | 773 bytes | vladsavitsky |
Comments
Comment #1
vladsavitsky commentedWrong patch.
Comment #3
vladsavitsky commentedAttached patch which changes type of messages from 'error' to 'status' for all messages about reached limits.
Comment #4
vladsavitsky commentedComment #6
danchadwick commentedI looked at the message and thought about them some more. I believe that each situation is correct as coded.
Submissions closed -> warning
Submissions are disabled by virtue of no roles being allowed -> warning
User needs to log in or register -> warning
User lacks permission to submit -> error
User has exceeded his/her submission count limit -> error
User has exceeded the form's submission count limit -> error
User has previously submitted the form (and none of the above apply) -> status
However, all this logic is in a theme function, which may be overridden as desired.
Comment #7
vladsavitsky commentedI can't agree with you. Those error message will be shown at node page (in my case Event page) which was 'Webform enabled'. So even if user just open node view page but not event try to submit webform he will see an error messages. What he did wrong?! Nothing. In this case it should be a 'status' message because it's just a reminder. If he wants to submit webform again then those messages should be show.
BTW
You wrote: "User has previously submitted the form (and none of the above apply) -> status"
For now it shows 'error' but not 'status'.
Comment #8
danchadwick commentedBut one of the above DOES apply. The user has exceeded his/her submission count limit. That's why it's an 'error'.
Webform is used in a wide variety of workflows through the site. Imagine that someone has clicked on an event webform node from a front-page list of nodes or views (which would not typically include the form). They are now expecting to see a form, but there is none. It's not that THEY did something wrong. It's that what they asked for (the form) can't be presented.
The reason the messages are themable is to allow site builders the option of changing such messages to suit their needs.
I would consider changing 'error' to 'warning' in the two cases where the submission limit is exceeded. But 'status' isn't appropriate for too many situations. Status means "everything is fine; here's some info you might want to know". That's not the case here.
Comment #10
danchadwick commentedI'm going forward with the middle ground to make these two situations about exceeding the submission limits warnings, rather than errors.
Committed to 7.x-4.x and 8.x.