Closed (won't fix)
Project:
Inline Entity Form
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2013 at 13:52 UTC
Updated:
25 Dec 2013 at 12:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
philipz commentedHere's a simple patch and seems to be working fine.
Comment #2
philipz commentedForgot
t()function in two places.Comment #3
summit commentedHi,
Using this patch I got error 500 and:
Greetings, Martijn
Comment #4
summit commentedHi, set this to "needs work" if thats ok.
greetings, Martijn
Comment #5
summit commentedSorry it is working as http://drupal.org/node/1940664#comment-7168446! somehow my field became cut off..
sorry for the inconvenience.
It would be great if I could select based on sku (and filtered by producttype).
Greetings, Martijn
Comment #6
bendiy commentedThis feature already exists with Entity Reference. You just need to create a view and in your reference field settings, set "Entity selection" to use "Views: Filter by an entity reference view".
Here's a module that add support for Entity Field Query views as well:
https://drupal.org/project/entityreference_efq_views
See the "Instructions" section on that page. It details how to set this up.
This gives you full control of what fields are searched for a matching string when using the Autocomplete widget. It also allows you to control what fields display in the list returned by the Autocomplete widget.
Comment #7
bojanz commentedI'm not going to commit this.
The default behavior is the same for all entity types: you search by entity title, get a "$title ($id)" result.
Product reference fields have the additional feature that you can search by title OR sku.
So someone might expect the title, someone might expect the SKU. The added code complexity of this patch
still misses in 50% of the cases (if you were expecting the title for instance).
I agree that it's better to use the entityreference feature to truly configure this, it's more powerful than an IEF feature can ever be.