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').

Comments

vladsavitsky’s picture

Wrong patch.

Status: Needs review » Needs work

The last submitted patch, 1: webform-change-messages-type-2453687-1.patch, failed testing.

vladsavitsky’s picture

StatusFileSize
new773 bytes

Attached patch which changes type of messages from 'error' to 'status' for all messages about reached limits.

vladsavitsky’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 3: webform-change-messages-type-2453687-2.patch, failed testing.

danchadwick’s picture

Status: Needs work » Closed (works as designed)

I 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.

vladsavitsky’s picture

Status: Closed (works as designed) » Active

I 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'.

danchadwick’s picture

BTW
You wrote: "User has previously submitted the form (and none of the above apply) -> status"

For now it shows 'error' but not 'status'.

But 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.

  • DanChadwick committed c921cc5 on 7.x-4.x
    Issue #2453687 by VladSavitsky, DanChadwick: Messages about reached...
  • DanChadwick committed 3fda1e8 on 8.x-4.x
    Issue #2453687 by VladSavitsky, DanChadwick: Messages about reached...
danchadwick’s picture

Version: 7.x-4.4 » 7.x-4.x-dev
Status: Active » Fixed
Issue tags: -error message, -message
StatusFileSize
new1.08 KB

I'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.

Status: Fixed » Closed (fixed)

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