Maybe this should be handled within Webforms or maybe this should be done in a seperate module, I don't know.
But a menu that gives you the ability to create "prebuilt" lists would be absolutely incredible. At the moment lots of people are just using a notepad and copy and pasting the same list for data integrity, and it would be good to remove the need for that and the risk of different data. Exporting and importing those lists would just be icing on the cake.
I imagine the menu would look very similar to the creation of a select component, only without a safe key field and other form related options. So I guess really just the name of the list and "Options" text area.
Comment | File | Size | Author |
---|---|---|---|
#2 | 11-05-2010 10-15-27 AM.png | 17.29 KB | healthent |
Comments
Comment #1
quicksketchWhile this is definitly possible from the API stand-point (we have a hook specifically for creating pre-built lists), I'm not sure where this would go in the UI or if it should be built into Webform directly. This issue would probably reduce the need for this at least at some level: #767290: Allow Views to be used as pluggable select list values.
Comment #2
healthent CreditAttribution: healthent commentedWhy not here as a tab? It's where you set all the other similar sitewide options so it makes perfect sense to me? (By that I mean that is the first place I would click to if this feature existed and I was searching for it)
Comment #3
quicksketchI'll keep this open as a feature request for others to chime in, but I don't have any sort of timeline for implementing and I'm unsure whether this should be added to Webform core.
Comment #4
vinmassaro CreditAttribution: vinmassaro commentedThis would be helpful as we are looking for a way to reuse webform components (a long select list for instance) that have to be rebuilt each time for a new webform.
Comment #5
bayousoft CreditAttribution: bayousoft commentedCan I manually create pre-built lists somewhere? Where are the default lists (days of week, states) created/saved? Love the webform module.
Comment #6
bayousoft CreditAttribution: bayousoft commentedNM Found them in ...webform/includes/webform.options.inc. Would you be interested in including addtl popular lists?
Comment #7
quicksketch@bayousoft: I'll consider some lists, but I think 90% of people's requests would be met by #767290: Allow Views to be used as pluggable select list values. You can add your own lists in a custom module by implementing hook_webform_select_options_info(). See webform.hooks.php.
Comment #8
vinmassaro CreditAttribution: vinmassaro commentedI think both techniques listed are too complicated for most users. I know in our case, the person wanting to create lists will not be able to do this in Views and would benefit greatly from either the reuse of components across multiple forms, or the ability to create lists.
Comment #9
bayousoft CreditAttribution: bayousoft commentedWould the "Country codes API" module be required to access the "countries" pre-built list as currently written?
Comment #10
bayousoft CreditAttribution: bayousoft commentedWell, you would certainly know better than me. My fear with a view is that there would too much addtl overhead for what we are doing.
Thanks.
Comment #11
quicksketchI'm not saying that other options aren't out there, but I think it's unlikely that I'll include a list-creator interface in Webform core. A separate module could easily provide an easy-to-use interface or allow reuse of existing lists. Any module can provide pre-built lists.
Yes. If you have Country Codes API it automatically becomes available. In D7 this is not necessary since it has a native list of countries built into core.
Comment #12
bayousoft CreditAttribution: bayousoft commentedI switched all new development over to Drupal from Coldfusion about 6 months ago. I can see myself using this module for just about every client so I should be able to contribute a "webform pre-built list" module. Otherwise, I could be in the code here quite a bit.
Comment #13
luketsimmonsHi guys,
Hopefully I'm not steering this off topic but it is related and will hopefully get more eyes on it than a fresh issue. I noticed that while the pre built list hook appears very helpful in principle, it doesn't seem to work as expected?
The current call in _webform_edit_select() (in components/select.inc), where the prebuilt lists are shown when adding/editing a select field, is for _webform_select_options_info() which isn't a hook invoke, it's just the default prebuilt options (days, states and countries).
This means you can create a custom hook, but it will never get called? Or am I missing something?
Thanks,
luke
Comment #14
luketsimmonsScratch that I'm being a dunce... it is invoking via _webform_select_options_info() I saw _webform_options_info(), which is the default private function for the pre built options.. it's just not invoking for my module, can't see why though, caches cleared, custom module is functioning fine...
Ah well back to the drawing board. Apologies for butting in!
Thanks,
luke
Comment #15
ajaysolutions CreditAttribution: ajaysolutions commentedWhat the OP and bayousoft are suggesting sounds perfect as a module for Webform (although I would like to see it in Webform core). I'm using Webform today for the first time ever, and it's wonderful. I'm using D7, and recreating a form for UK addresses. I found the Webform Validation module, which will be perfect for using regular expressions to validate UK postcodes, but I was looking for a list of UK counties for a drop-down in my Webform.
I decided to create my own piped list with groups for England, Wales, Scotland and Northern Ireland, and stored this in a document in the cloud for future reference (as I'll doubtless need this for lots of sites).
When I scrolled further down the page, I then noticed "Load a pre-built option list", which doesn't include UK counties, but that started me on this afternoon's Google hunt for creating Webform pre-built option lists... which lead me here.
To have somewhere where lists can be saved, imported and exported would be extremely useful in the Webform UI, without needing to touch PHP.
Please (re)consider :)
Many thanks, quicksketch, for an otherwise very useful and practical module!!!
Comment #16
oscarjgarza CreditAttribution: oscarjgarza commented+1 for this module / core update.
Comment #17
DanChadwick CreditAttribution: DanChadwick commentedThere won't be further feature development in the X.x-3.x branches.
Comment #18
jrwilson CreditAttribution: jrwilson commentedPerhaps a simplified way for site builders is to use: values
Comment #19
DanChadwick CreditAttribution: DanChadwick commentedThis post indicates that the 'webform views select' sandbox may become a module.
http://www.mediacurrent.com/blog/contrib-committee-progress-report-janua...
This would be for webform 7.x.