Grid components should allow unique validation. This would mean that any given option can only be used by one question. Use case: ranking. Questions would be the things to be ranked, options would be numbers. Unique validation prevents items from sharing the same rank.

Comments

quicksketch’s picture

Thanks Liam, sounds like a good feature request to me.

David_Rothstein’s picture

Status: Active » Needs review
StatusFileSize
new2 KB

Here is a patch.

I'm using "unique" as the machine key for this new validation option, even though it behaves quite differently from the "unique" validation already in use for other components. I think that's OK though.

Chipie’s picture

StatusFileSize
new37.49 KB

Thanks for the patch. I works

My Problem is, that I'm using Form Builder to create forms.

The "unique" option is not shown there.

David_Rothstein’s picture

@Chipie, check out #1405108: Add support for Webform's "unique" validation - the patch I posted there (for Form Builder) is meant to go along with this one.

Chipie’s picture

StatusFileSize
new66.27 KB

Thank you for the reply. I have applied the patch, but I still can't see the option in form builder?

In which tab should it be located? In validation?

screenshot

David_Rothstein’s picture

Yes, under Validation.

You need to apply both patches in that issue (#2 and #7), since the first one wasn't committed yet.

Chipie’s picture

I see. Now it works. Thank you very much for your support.

quicksketch’s picture

Status: Needs review » Fixed

Thanks guys! In the future, @Chipie feel free to move the issue to "Reviewed and Tested by the Community", that would have gotten my attention sooner. Committed to the 7.x-4.x branch. Great patch.

liam morland’s picture

Thanks very much, everyone.

Status: Fixed » Closed (fixed)

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