Checking off Unique under Form Validation on an element (like name or email) can restrict duplicate registration to an event such as one provided through "Demo: Event Registration" but prevents registration for "Demo: Event 2" after registering for "Demo: Event 1".

While there appears to be a way to limit the "Per user submission limit per source entity" that prevents one computer from being used to complete multiple registrations whether the same or different.

The GUI configuration should allow limit only one Unique element (like Email) to register per webform as well as per source entity.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

benkallos created an issue. See original summary.

jrockowitz’s picture

We should be able to add support for #unique_source_entity and #unique_user to \Drupal\webform\Plugin\WebformElementBase::validateUnique

  • jrockowitz committed fe8dca0 on 2911689-unique
    Issue #2911689: Unique Element Per Source Entity (Node)
    
jrockowitz’s picture

jrockowitz’s picture

Here is a screenshot of the updated #unique property.

jrockowitz’s picture

Status: Active » Needs review

  • jrockowitz committed 8483ecc on 8.x-5.x
    Issue #2911689 by jrockowitz, benkallos: Unique Element Per Source...
jrockowitz’s picture

Status: Needs review » Fixed

I committed the patch. Please download the latest dev release to review.

Status: Fixed » Closed (fixed)

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