Problem/Motivation

We have core module "Inline form errors". Once this module enabled and ajax validation enabled in webform - it's making sense to not display status messages inside of form at all (instead, there is already inline errors displayed).

Steps to reproduce

1. Standard profile installation
2. Enable Inline form errors core module
3. Install and enable contrib Webform and Webform UI modules
4. Go to the settings of default webform "Contact" and enable "use Ajax" setting.
5. View Contact form and for example in one of the required text fields fill empty space " ", then click on Submit.

You will see inline form errors + status messages

Proposed resolution

Add one more validation setting in webform, like this:
test

and remove display of status messages in case if this setting is TRUE

Issue fork webform-3395218

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kostyashupenko created an issue. See original summary.

cilefen’s picture

Category: Task » Feature request
kostyashupenko’s picture

Status: Active » Needs work
StatusFileSize
new4.79 KB

I'm not backender, but this patch already can help a lot (at least it's really disabling status messages for your forms)
Also user brolad helped with this

Aditi Saraf made their first commit to this issue’s fork.

aditi saraf’s picture

StatusFileSize
new11.88 KB

i am Not able to reproduce it , not getting Disable status message checkbox .

jrockowitz’s picture

I am very hesitant to add any new features to the Webform module.

This feature can be handled in a very simple form alter hook that detects an Ajax request.

kostyashupenko’s picture

I can't agree @jrockowitz
Displaying of status messages is hardcoded in webform with no ability to get rid of it quickly.

Guess how many different webforms can exist on the web-site, then guess Inline form errors module enabled. Then guess 70% of the webforms shouldn't have status messages. Then guess how many alter hooks need to write.

andypost’s picture

There's JS API for messages https://www.drupal.org/node/2930536

jrockowitz’s picture

Status: Needs work » Closed (won't fix)

Removing the 'status_messages' can also be accomplished in form alter hook in custom module or theme.