There's a patch in the Entity reference issue queue to achieve exactly what you did in this module: #2014535: Attach entity_reference selection handler on a form element without creating field/instance. You could have contributed to that instead..

Comments

damienmckenna’s picture

Another way of phrasing it: There's work in progress on EntityReference to include this functionality directly in the module, would you mind seeing if you could collaborate on that, maybe merge this module's functionality into EntityReference itself?

slv_’s picture

@amateescu:

I did look at the module's code to see if I could come up with some clean code that could be contributed later. I didn't have the time to write something clean enough to integrate properly with the well written oop code of entityreference module. Also, understand I can't know about every single issue of entityreference, and even if I looked for it I could have missed it. 334 open issues... It's just easy to miss things.

@DamienMcKenna:

To both questions, no, I wouldn't mind. Will try to have a look at that patch, and also at possible integration of this module within entityreference (would love to contribute to such a great tool!).

Anyways, that's not gonna happen in the next few weeks. I'm in the middle of moving to another country, so quite busy during the following days.

JohnnyX’s picture

Would it work with chosen like Autocomplete Deluxe/ Autocomplete Deluxe for References?
I use these moduls to reference users and nodes in a nice UI.

slv_’s picture

Not with Autocomplete Delux for References, as I guess that's quite coupled to the 'references' module. In other words, that's a integration of Autocomplete Deluxe for the References module.

In the same way, Autocomplete Deluxe can be integrated to work with this, that's for sure, but is not something that you can get out of the box, because both modules provide their custom form element, so it would be needed some kind of bridge module between them.

slv_’s picture

Status: Active » Postponed

Postponing this. I'd still like to have a look at integrating this with entityreference module, but right now I just don't have the time, so prefer to mark it as postponed rather than leaving it active even though I'm not actually looking at it.

slv_’s picture

Issue summary: View changes
Status: Postponed » Closed (won't fix)

I'm going to close this as it doesn't seem likely to happen (don't have the time for it), and there are quite some users already of the module. Also, still makes sense to have this a separate module, because on scenarios where people is building their own forms, they might not need the whole entityreference module, and this could just be enough.

Good to keep in mind this use case for a D8 release of the entityreference module, though =).