I am wondering if there is a way to limit the number of submissions based on the input provided for a component.

For example, say I want to have people sign up for an event and enter a team name, only 5 people can submit a form with the same team name entered. Is this possible? Is there a way to validate for this?

Thanks in advance for any help!!

Comments

quicksketch’s picture

Status: Active » Fixed
mgladding’s picture

Will do! Thanks!

Status: Fixed » Closed (fixed)

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

jojonaloha’s picture

Category: support » feature
Status: Closed (fixed) » Needs review
StatusFileSize
new14.65 KB

I apologize if I'm hijacking an old issue. I started working on a patch for this before I found this issue.

I looked at webform_validation, which seemed like it would work, but for my use I would have to form_alter the custom_data field when creating a new rule for my validator to add extra fields (which would need to be serialized in the database) to get a usable interface.

Anyway, I liked this approach a little better for my use-case. I'm sure the patch isn't perfect, but it should be pretty close.

quicksketch’s picture

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

Although this is an interesting feature, I don't think it's appropriate for the main project. Especially considering alternative approaches already exist to solve this less-common scenario, I think it would be better to point towards that solution. I think the UI for Webform Validation is more understandable than this option also. When reading over the options provided in this patch in the UI, my brain starts to struggle with the meaning of what it does.

While I appreciate the patch and work @jojonaloha, I don't think it's the right level of complexity for the out-of-box Webform module. Please reopen if you'd like to discuss.