When using the core Contact form module to create a form, I have several text (plain) fields set to Unlimited. The user should be able to "add another item" to cause a new space to appear to input more of the same item.

The "add another item" button does not work if any of the form's required fields are not filled in. The required fields can occur either before or after the "add another item" field. But they must ALL be filled in before the button will work. It doesn't matter if the field with the "add another button" is itself required or not, the behavior is the same. The AJAX button twirls for a second but no new item space appears. If I fill in all required fields on the form and then use the button, a new space for input appears as expected.

I found this problem occurs when I create forms using Drupal core contact forms module or the contributed EForms module. I'm posting it here because I'd rather use the core contact form feature.

Am I doing something wrong? I've searched everywhere and can't find any similar problem since Drupal 6, really. The behavior I'd like to see is that the button will produce a new space to input into, regardless of whether other required fields have been completed yet. My theory is that using the button is prompting some early validation, which is failing when the entire form is not yet completely filled out.

Additional Info: this dev site is hosted on Pantheon. The form itself can be seen here, in its EForm version: http://dev-did-you-see-that.pantheonsite.io/eform/submit/eclkc_submissio... The same behavior occurs in the core contact module version.

Comments

leraa created an issue. See original summary.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

ibustos’s picture

Status: Active » Closed (duplicate)