Closed (fixed)
Project:
Options Element
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Feb 2011 at 11:26 UTC
Updated:
11 Dec 2013 at 01:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
quicksketchThis module does not yet support CCK or the Field module in Drupal 7, though that is an obvious goal that I'd like to address eventually. I'll move this to a support request and this will become the official thread for progress on this front.
Comment #2
agence web coheractio commented+1
Comment #3
2xe commented+1 !
Comment #4
jenlampton+1 :)
Comment #5
sea4 commented+1
Comment #6
TimelessDomain commentedthis would make Prepopulate http://drupal.org/project/prepopulate much more powerful
Comment #7
alice-kahn commentedHi,
I'm looking for a solution to add images as option values. Just like Yes/No, I want Image1/Image2.
Is this possible with this module or with any other module? Someone please help me with this?
Thanks
Alice
Comment #8
quicksketchNo, this module will not help setting images as options. You could enter in
<img>tags manually as the values of course and that would work, but this module will not help you upload images for each option.Comment #9
alice-kahn commentedBut how can I do that? please give me a suggestion/sample?
Thanks
Comment #10
jenlampton@alice-kahn this is the issue queue for the Options Element module. You are adding a comment on a specific issue against that module.
If you need advice on which module to use, please try the forums, groups.drupal.org, or IRC.
Comment #11
tnanek commented+1
Comment #12
stan turyn commented+1 (also hoping that adding CCK support will take care of Drupal Commerce fields too)
Comment #13
moertle commentedhave a look to the core module "List". After enabling it, this elements are available.
Cheers
Comment #14
tnanek commented@moertle
The defaults for select lists, radios and checkboxes are available after enabling the List module. But not the administrative interface added by this project, which is much more user friendly to the layperson when it comes to making a select list - it may work for Webforms (I don't know since I haven't needed to use Webform at all) but not on the Field API, which is what this particular issue is pertaining to; at least in Drupal 7 anyhow.
Hope that clarifies the issue some.
Comment #15
halefxQuicksketch, could you add a note to the project description that this currently only works for Webform option fields?
Comment #16
kalabroWhen I found this widget I was so happy — it's very handy for creating lists! Thank you, @quicksketch! I can't understand why it is not used by default in Drupal Field UI module.
Unfortunately there is no any patch for integration Options Element with Field UI. I started one. It's not perfect, but it works! :) I am willing to work hard to make this issue fixed.
How to test:
Apply the patch to branch 7.x-1.x, flush cache.
Any comments are welcome.
Update: see #18 for patch.
Comment #17
kalabroOops! Some minor fixes.
Comment #18
kalabroAnd one more :)
Only the latest patch should be tested.
Comment #19
quicksketchThanks @kalabro! I'd been wanting to incorporate options element support for Field module for quite some time. Thanks for the patch! I'll review it when I get the chance.
Comment #20
quicksketchAlso, at this point I think it would wise of us just to handle Drupal 7 and not change out the interface on D6 users. Let's focus on the Field module. I *would* like to see options element in core, so this is a great step towards that goal.
Comment #21
kalabroKnown problems:
When you change field cardinality from one to multiple, default values are not saved for the first time. It is because Field UI default widget is not ready to take multiple values without page reload.
Comment #22
kalabroThe patch still works. Small fix with default values for field settings form.
About #21: I think it's not critical. For me, current state is pretty good.
Comment #23
webcultist commentedIt worked for me very well, please commit this patch =)
Big thanks for this!
Comment #24
Sk8erPeter commentedkalabro, thank you very much, this seems to work great! :)
Here are some screenshots as a proof:
a regular List (text) field:
editing List (text) field:
adding a new node:
Comment #25
kalabroThanks for review, guys!
@quicksketch, what do you think about it? Maybe we can add it to options_element-dev?
Comment #26
dave reidI think it would be nice if we abstracted this one step further and had a way to convert a textarea with key|value pairs in it as text, into an options element. This would be useful not just here for the settings for select lists. Maybe a follow-up though.
Comment #27
naeluh commented+1
Comment #28
dave reidRelated: #1057294: Provide support for Field Select Lists, Radios, and Checkboxes
Comment #29
dave reidWrong link, see #1980868: Provide a reusable API to convert textarea fields to an options element.
Has this been manually tested with different 'Number of values' selected in the field? Unlimited? 2 or 3? Does it still work then?
Comment #30
kalabro@Dave, should I convert patch from #22 to 7.x-1.8?
The only problem was #21 and I don't know how to fix it without modifying core field UI module :)
Comment #31
simon georges commentedI suppose, as a feature request, it should go to the -dev version of the module (and bumping that, by the way).
Comment #32
mbenken commentedI am trying to use version 7.x-1.x-dev and having no luck. Have all the patches from above been committed to the latest dev version? I am using JQuery 1.5. I have installed/enabled the module, added a Select List field to a content type and I do not see what Sk8erPeter is seeing in #24. What am I not doing right?
Michael
Comment #33
kalabro@mbenken, as you can see, last patch was submitted on November 13, 2012. Since that new version of Options Element was released. I don't plan to re-roll it again.
If someone is interested you are welcome!
Comment #34
mbenken commented@kalabro, which version of the Options Element should I be using: 7.x-1.x-dev or 7.x-1.9?
Comment #35
kalabro@mbenken all rerolls are usually done on latest dev: https://drupal.org/node/739080/git-instructions/7.x-1.x
Comment #36
KristineC commented@mbenken did you figure it out? I installed 7.x-1.x and I also do not see the options element appear in a regular content type.
Comment #37
baysaa commentedMaybe it should be mentioned on the module description that this module works with Webform module only out of the box (non-dev versions)? It's a bit confusing otherwise. And linking to this issue for patches to make it work with CCK/Fields would be even better.
Should be
Or something or other.
Comment #38
quicksketchOverall this looks like a great patch! The only concern I have reading through the overall code is that options_element.js probably shouldn't have JS specific to Field module in it. It'd be preferable for me if that was a separate JS file that was added only when editing a field (I know... another HTTP request for a really silly reason). Maybe we could make it a separate behavior at least? I'm just not keen on a very specific piece of JS being in our perfectly stand-alone JS.
Obviously this would go only into D7. Seems like a good opportunity to finally completely drop support for D6. Are we concerned about this change causing issues for modules that may be using the options area for things other than a piped list of values (i.e. using PHP code to assemble a list of options)?
Comment #39
quicksketchI revised this patch slightly with the following changes:
- Fixed minor merge conflict.
- Fixed coding standards in docs.
- Moved the Field-specific JS to a separate behavior.
All-in-all, great work! I decided for the time being we'll just continue with the 1.x branch as-is, so this will be in the 1.10 release. Thanks all!