Closed (fixed)
Project:
Select (or other)
Version:
7.x-3.x-dev
Component:
Forms API (Developers)
Priority:
Normal
Category:
Feature request
Assigned:
Issue tags:
Reporter:
Created:
7 Aug 2012 at 06:42 UTC
Updated:
10 Sep 2015 at 07:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
danielb commentedI am unable to advise you about this as I'd pretty much have to figure it out and write it to be able to explain it. Surely it's simply a matter of populating the options with existing terms and then looking at the form submissions to see what incoming data looks like and then handling that appropriately.
I am unsure if you will be able to add to a term reference field, or if you have to make your own version of that field to be able to get it past validation and handle the submission, etc...
Comment #2
Robin Millette commentedpopulist, sounds like a job for autocomplete deluxe.
Comment #3
danielb commentedthere ya go
Comment #4
Robin Millette commentedFixed, as in won't fix? Or did I miss a commit?
Comment #5
spouilly commentedWhy not mention select_or_other_taxonomy ?
see http://drupal.org/node/1208512#comment-5605324
I thought I posted a message about it previously, but can find it anymore ...
S.
Comment #7
kaizerking commentedprobably if some one one could bring that taxonomy other in to this it would be nice
Comment #8
dtrees commentedIs this module needed to get a select other field for taxonomy terms?
I am currently testing an approach where I am using two fields for a content type that reference the same vocabulary. For example, the Category field is set a term reference field with a radio button/check boxes widget and the second field is labeled Other set as a term reference to the same vocabulary and has the autocomplete widget. The problem with this approach is that when a user enters a value in the autocomplete field and saves the node Drupal only saves a new term to the vocabulary. It doesn't actually select that term.
I set a rule as a workaround, if (condition) category other field is NOT empty then (action) add the data value to category list and set the Other field value to blank. Hopefully I can clean up the CSS to show it properly.
Can someone please tell me what I am missing, is this a bad data approach?
Comment #9
haydeniv commentedLooks interesting. I'll take a look at whether it is a good fit to incorporate into this module.
@dtrees I don't see that kind of integration happening anytime soon with this module so your work around is probably the best bet.
Comment #10
haydeniv commentedMarked #1169968: Options not showing up for Taxonomy Term Reference lists as a duplicate of this issue.
Comment #11
acbramley commented+1 for getting select or other taxonomy in, I've just tested installing both modules and creating a taxonomy reference field and it worked without errors, just what I needed.
Comment #12
haydeniv commentedI've posted for input over at #1208512: Port Taxonomy Other to D7 to see what those guys think about this.
Comment #13
haydeniv commentedOne thing that we will want to consider in all of this as well is that Entity Reference is now in core in Drupal 8 and is looking to deprecate the term reference widget. #1847596: Remove Taxonomy term reference field in favor of Entity reference
If that lands that will change the behavior of this module, and make a lot of work for the upgrade path, if we choose to incorporate taxonomy.
Comment #14
acbramley commentedCan we not just get the 7 port of Taxonomy Other committed as a release for that module and leave the 2 separate?
Comment #15
voipfc commentedConcerns about Drupal 8 are rather premature now. The problems with Drupal 6 contrib modules languishing when Drupal 7 hadn't taken off yet are going to be repeated here if module developers adopt this outlook. The only thing they will have in common is the name, and the promise that Drupal 8 will be considered ready when Drupal 7 can be imported into it. Evolutionary development matters and Drupal 8 is a radical change.
Consider that even Drupal.org is still on Drupal 6.
Comment #16
haydeniv commentedLet's do this then.
I'm marking #1208512: Port Taxonomy Other to D7 as a duplicate of this issue and we'll track the port here. Here is an initial patch against 7.x-3.x. Right now it is just a separate module but we need to decide if we want to just add it as a formatter whenever Select or Other is enabled.
Comment #17
johnpitcairn commentedYou didn't actually close the other issue...
Considering a term is already an entity, then another possible approach is using an entityreference field rather than term reference, then entity connect will allow users to create and add new terms to an existing select/checkbox/radio list directly within the parent edit form.
Comment #18
rvilarPatch in #16 works for me. Maybe can be better to add this submodule in a new folder to keep the original module organized.
Comment #19
haydeniv commentedIdealy this won't be a submodule but just a new formatter for all of the field types.
Comment #20
SchwebDesign commented#16 works great for me as well... with a HUGE added bonus...
Using a taxonomy term reference field with Select (or other), instead of a normal text field with Select (or other) allows you to have a select list/drop down of allowed values if exposing this as a filter in a view.
See these two issues here:
https://drupal.org/node/1495650
https://drupal.org/node/1450870
I believe 'converting' your text field input to being taxonomy terms instead is the best solution for this. (one good way to do that is here: https://drupal.org/node/215472#comment-2086422 )
Comment #21
haydeniv commentedJust so that this is perfectly clear: this issue is set to "Needs Work" because the patch is no where close to a state where it will be committed. I plan on integrating the functionality into the main module and not keep it as a separate module. That means it is not a good idea to use this patch on a live site yet. It is going to change drastically by the time it actually gets committed and there is no guarantee that won't break your site if you try and install the actual module after running this patch. I just posted the patch as a starting point if others wanted to help out. If you already know that great! If not, be warned. :)
Comment #22
SchwebDesign commentedThanks! Indeed, that's a good warning and i was largely expecting it (rather than running patch, i manually added this submodule and am keeping track of that modded code (apart from the original module code). I'll be watching here for updates on when ends up happening with this. Thanks!
Comment #23
galaxor commentedHi. I was on a plane without access to the internet, so I didn't see that work had already been done on this. Therefore, I also did an integration for taxonomy term reference. I haven't looked at your patch, so I don't know if mine has any advantages over yours, but mine seems to work for single- and multiple-select, and for checkboxes and select lists.
Here is a patch based on the 7.x-2.x branch.
Comment #24
aze2010 commentedsubscribing! Important
Comment #25
moonray commentedPatch in #23 worked like a charm.
Comment #26
shaundychkoSetting to "needs review" to get @haydeniv's feedback on the patch in #23.
Comment #27
shaundychkoRerolled patch #23 against 7.x-2.19.
Comment #28
flocondetoileHello,
Patch #27 works fine with 7.x-2.19
Comment #29
haydeniv commentedThis will be a 3.x feature. Please reroll. Also everything new in 3.x will need tests. Thanks!
Comment #30
haydeniv commentedTagging
Comment #31
ChiKam commentedSo far, the patch in #16 is working for me. Thanks!
Comment #32
rvilarThis is the same patch from #27 but with support for translation of taxonomy terms.
Comment #32.0
rvilarUpdate issue summary for new feature request.
Comment #33
jsibley commentedIs this stalled? Any chance of a status update?
Thanks.
Comment #34
haydeniv commentedThis is scheduled for a 3.x release which is a little stalled right now. In order to get a 3.x release out this module will need automated testing added, all javascript converted to Drupal AJAX framework and an upgrade path from 2.x and Taxonomy Other for Drupal 6. Patches are always welcome.
Comment #35
gbyte#32 and the previous patches works well except the setting 'Ignore the values' doesn't work. The value in 'Other' gets always added to the taxonomy vocabulary no matter what. Or is this expected behavior?
Comment #36
bpadaria commentedA correction I noticed for terms with comma, on patch mentioned in #32.
In select_or_other_field_widget_validate() function,
$element['#value'] = implode(', ', $terms); should be replaced with
$element['#value'] = drupal_implode_tags($terms);
It takes care of terms containing comma.
Hope it helps
Comment #37
damienmckennaThis is the patch from #32 with the fix recommended from #36 included.
Comment #38
damienmckennaBTW from a basic functionality perspective, this appears to work nicely, and is a great alternative to the usual tags UI.
Comment #39
damienmckennaUpdated to resolves a few small coding standards bugs.
Comment #40
tyler.frankenstein commented#39 works great. Tested the "Select (or other) list" and "Select (or other) check boxes/radio buttons" widgets against single value, and multi value fields.
Comment #41
haydeniv commentedI would have liked to see some kind of test added for this but as we don't have tests for any other parts of this module we may as well get it in.
Comment #44
abu-zakham commentedGeart works @DamienMcKenna works with me
Comment #45
phily#39 works great with select or other 2.20, thank you DamienMcKenna.
Edit: and 2.21 as well ;-)
Comment #46
kopeboyCould you please mention it supports taxonomy fields on the module page with version 3?
I found this unintentionally after weeks I tried the module (with the stable release of course) which was missing the functionality.. :/
Comment #47
legolasbo@kopeboy
I've just added the following to the module page.
Comment #48
kopeboyThanks by Drupal users for the quick answer and solution! :)
Comment #49
kopeboyWill this work with multilingual taxonomy? I mean Entity translated term titles..
Comment #50
legolasbo@kopeboy, I don't know, only one way to find out ;)
Comment #51
abu-zakham commented@kopeboy see this issue https://www.drupal.org/node/2400005
Comment #52
brandonc503 commentedHi. I am trying to find out if there is existing issue open already for when term is child in hierarcy..
http://oi60.tinypic.com/aeutmo.jpg
(that image is just entering edit node. the other is checked already and has Hats entered.)
here my node has Clothing and Hats term.. but since Hats is under Clothing it comes up -Hats.. which is not seen the same as Hats. If i was to now check -Hats, -Hats is added to vocab, so I then have -Hats and Hats
If i remove Hats from under parent then refresh node edit page.. http://oi57.tinypic.com/13zq05v.jpg
Using the 7.3 dev btw. THANKS
Comment #53
legolasbo@brandonc503,
The issue you are describing is a new one. Please open a new ticket for it, so it can be addressed appropriately.
Also the first image you linked does not work and hotlinking images is not recommended. You can upload images to your issue/comment.