Closed (fixed)
Project:
Form Builder
Version:
7.x-1.x-dev
Component:
Webform Itegration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2012 at 19:40 UTC
Updated:
19 Aug 2013 at 18:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
gdunkle commentedHere is a start. This implements unique validation on textfield and email components.
Comment #2
fenstratAttached patch adds the "unique" setting for email, number and textfield's.
Comment #3
quicksketchHey @fenstrat! Thanks for the patches. I'm encountering a similar problem with the "private" option, which also needs to be available as a FAPI property for Form Builder to edit it. I'm going to take a crack at combining your patches here with the approach I've used in these issues:
#1729726: Webform "private" option does not load properly
#1730714: Allow "private" option to be editable in Form Builder
Comment #4
quicksketchHm, actually "unique" isn't a global property that is defined in hook_webform_component_info() like "private" is. Maybe your approach is more suitable for this situation, unless we want to make "unique" a global feature like "conditional" and "private". I'm not sure it applies to the majority of properties or not.
Comment #5
fenstratNo worries @quicksketch. Yeah to be honest I'm actually not sure of the usefulness of the whole "unique" validation. Somehow it got enabled on an email component and so I went to turn it off in form builder only to find it wasn't possible, hence the patch in #2. I'd have to agree that it's not a global option, just the 3 component types, and while there is code repetition in #2 I think it's the best way forward (unless you see a need to extend the unique setting).
So in this case this is a webform only property, so the "webform_" prefixing idea in #1729726-1: Webform "private" option does not load properly shouldn't apply right?
Comment #6
torotil commentedThe patch works quite fine for me on multiple sites. Setting this to RTBC.
Comment #7
David_Rothstein commentedI just posted a patch at #1662904: Allow unique validation on grid components to add a "unique" validation option for the Webform grid component, so here's a patch to add it to Form Builder too.
It can be considered a followup patch for this issue (depending on the fate of #1662904: Allow unique validation on grid components) so it shouldn't be committed now and doesn't interfere with the RTBC status of the patch above; that's why I gave it a "do-not-test" suffix.
Comment #8
quicksketchThanks @David_Rothstein! Committed finally.
Comment #9
David_Rothstein commentedI am sorry for cluttering this issue a bit with my "pre-commit followup", but see my comment above - #2 still needs to be committed also. It looks like only #7 was committed, so I'm setting this back to RTBC. Thanks!
Comment #10
quicksketchDoh, thanks @David_Rothstein! Committed and pushed to the 7.x branch.