Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Based on http://drupal.org/node/1526084#comment-6176282
Maybe adding a select list would be the first one I can think of. Add ability to select multiple variants, if selected.
Comments
Comment #1
mansspams CreditAttribution: mansspams commentedViews or VBO widget would be ultracool.
Comment #2
bojanz CreditAttribution: bojanz commentedThe existing entityreference integration should allow the "Reference existing" autocomplete to pull results from a view.
That's as far as IEF 1.x will be able to go.
After #1881616: Move the inline forms (add, edit, remove, reference existing) to modals is implemented, we might be able to go further, but in general using a View as a selection widget requires huge hacks and the resulting bugs are usually not worth it.
Comment #3
Summit CreditAttribution: Summit commentedHi, coming from http://drupal.org/node/1944266
Would love to be able to filter on producttype, because I have different producttypes which needs to be handled by different product displays (nodes).
Right now all products are shown on "existing variants" and they are only possible to select using autocomplete widget. These are much to much products sometimes for a producttype which sometimes only has 20 relevant productvariants.
Thanks a lot in advance for considering getting this in.
greetings, Martijn
Comment #4
Summit CreditAttribution: Summit commentedHi,
For your remark http://drupal.org/node/1558120 on which you are referring to "which for entityreference fields should allow fetching from the results of a view as well, but I haven't tested that yet"; made a new issue: http://drupal.org/node/1966738
greetings,
Martijn
Comment #5
dwwI was assuming there was a way to configure this to just enhance the existing entity_reference widget (whatever it might be) to inject a "add new" next to what's there. In my case, the content creators aren't already going to know if they can reference existing or need to add new. In some cases, they just want the dropdown of existing values. In others, they need to see and try the autocomplete first. Only if they don't see what they're adding would they want to click a button and wait for the ajax reload to replace the form element.
Also, if you set the widget to a IEF - single value it *always* embeds the inline add form and doesn't let you select an existing at all, making the 'Allow users to add existing nodes.' widget setting checkbox (and the related settings that are revealed if you check it) meaningless. ;)
#1881616: Move the inline forms (add, edit, remove, reference existing) to modals won't really help this (and in some ways would make it worse). I just want to see the selection widget I've already got when the form first load, and if I need to add a new entity, click a button for a modal or ajax inline rebuild. I haven't dove into the code yet to understand why this would be so hard. But, I might be willing to spend some effort making it happen since my itch is itchy these days. ;) Any advice or pointers would be appreciated.
Based on a quick search of the IEF issue queue, this seems like the right issue to be discussing this in, but if not, please point me to a better one.
Thanks!
-Derek
Comment #6
bunthorne CreditAttribution: bunthorne commentedI agree with Derek's assumption that most Content creators will not know whether their Term already exists. They should be able to begin typing the term (if using something like Chosen jQuery) for the select list; when it comes up blank, they would continue typing the complete name which would open the new Add form fields with the typed name in the Title field.
Is this on the drawing board? I don't think I can implement IEF until it is, as nice as it is.
Comment #7
bojanz CreditAttribution: bojanz commentedNo, I have no time for work of that scale at the moment. Patches welcome.
Comment #7.0
bojanz CreditAttribution: bojanz commentedadded "Add ability to select multiple variants, if selected."
Comment #8
bendiy CreditAttribution: bendiy commentedI'm getting close to this over at #2134035: Allow to add existing entities using the single value field widget
Comment #9
lucyp CreditAttribution: lucyp commentedAny progress on this?
I'd love to have the choice to use a different widget (not just the autocomplete) for selecting existing entities.
Unfortunately I wasn't yet able to understand the mega-patch submitted by bendiy (referenced above) as it deals with a number of different issues.
Comment #10
AaronBaumanLooks like this feature dropped out of the patch in #2134035
I'll attempt to isolate that functionality and re-roll here.
Comment #11
AaronBaumannevermind.
That patch is a beast.
I will stick to a form_alter for my needs.
Sorry.
Comment #12
milos.kroulik CreditAttribution: milos.kroulik commented#11 Can you post an example of your hook, please? It looks like others also need something like this.
Comment #13
Syndz CreditAttribution: Syndz commentedThis patch gives the choice between autocomplete and dropdown
Comment #14
brunodboComment #15
Syndz CreditAttribution: Syndz commentedThis is the same patch as #13, but using Drupal coding standards.
Comment #17
Syndz CreditAttribution: Syndz commentedBugfix for #13, correct target bundles
Comment #19
Syndz CreditAttribution: Syndz commentedRerolled patch.
Comment #20
junaidpvRerolled patch as #19 does not apply cleanly.
Comment #21
junaidpvImproved to use entity selection handle to provide the entities to show in drop down. So, it will work with view selection mode too.
Comment #22
junaidpvComment #26
dwwHeh, here I am 10+ years later. Found this while searching, forgot I had been here. This is partly being solved at #2683125: Allow select widget for "Add existing items".
Comment #27
geek-merlinYah, we have a lot of zombies down the well.
If this is still relevant (otherwise close) this goes to 3.x as main development branch.