We have a store that has already had 10, 000 or more product entities already added. The inline entity form allows us to create new product entities form the display node, but doesn't seem to allow us to also choose/browse from existing entities. (Looking for a way to mix and match.)

Comments

bojanz’s picture

It's on my todo list, though probably not soon.
I need to add an "actions api" first, so that people can provide actions other than the "add" one, such as "reference existing' and "bulk add".

joachim’s picture

This is something I'm going to need on a project.

bojanz, could you perhaps sketch out a bit more of how you envisage this should be built, as I may start looking at it before you get to it :)

larowlan’s picture

guys, I may also have some time to contribute on this.
My 2c - the inline entity form should let you choose an alternate widget (from the list of enabled widgets) for selecting an existing one

Anonymous’s picture

Yes this is exactly what I need too.

@joachim I don't suppose you've made any progress with this?

Could we start by copying the functionality of the default "Autocomplete text field" widget, and attach that onto the bottom of the "Inline entity form" widget? Any pointers as to where this code might be found would be appreciated.

jddeli’s picture

Priority: Normal » Critical

Is there any progress?

bojanz’s picture

Priority: Critical » Normal

@jddeli
There is no such thing as a critical feature request. You're free to code it yourself and submit a patch if it's urgent.

@others
Being able to choose another widget to be used for selecting sounds good. Make it work, and I can make the code pretty afterwards.

jddeli’s picture

Category: feature » bug
Priority: Normal » Major

Is there any progress?

bojanz’s picture

Category: bug » feature
Priority: Major » Normal

No progress. And no silly issue status change will make that happen faster.

jddeli’s picture

Category: feature » bug
Priority: Normal » Major

I have to put over 1.000 or more product entities that i have already added.
I need this to work. So it is critical bojanz.
If there is an ather solution please tell me.

bojanz’s picture

I told you to learn how to behave on drupal.org (on the unrelated issue you spammed).
I told you to stop changing and abusing the issue statuses.
You chose to ignore all that, instead of opening a support request and waiting for me to help you.

Because of that, you will not be getting any help from me, or any further responses. Have a nice day.

jddeli’s picture

Category: bug » task

This does not help anyone who has a problem bojanz.
The Domination of a man to others for a directive on the need for a problem he wants to show that no solution you want to help anyone.
I will insist to ask because I have a problem.
Is there any progress?

timmillwood’s picture

Category: task » feature
Priority: Major » Normal

"A do-ocracy (also sometimes do-opoly, which is a more obvious pun on 'duopoly') is an organizational structure in which individuals choose roles and tasks for themselves and execute them. Responsibilities attach to people who do the work, rather than elected or selected officials."

jddeli’s picture

This means that not to give attention to what was said and wait for someone to help me concerned.

Anonymous’s picture

@jddeli

I need this to work. So it is critical

This is not true. I would really like this feature as well, but that does not mean it is critical to the IEF module. I'm sure it will get implemented eventually (perhaps even by me), but unless you do it yourself, you cannot demand it get done immediately.

If there is an ather solution please tell me.

If you change the widget back to "Autocomplete text field", you can add existing Products by their SKU, or you can use the Commerce PDM module to manage the relationships between Products and Product Displays using a drag-and-drop interface. Either way, arranging 1000 Products is going to take a while...

jddeli’s picture

Thanks for the reply and suggestion jackocnr .
I will try and we'll comment later.

jddeli’s picture

Perhaps the best way is to use are:
1. Put two variations.
a). A Final Product reference with Check boxes/radio buttons to select existing products.
b). A variations with Inline entity form to create new products.
2. After a pick in the products we create from the b.
3. In the manage display show only a).

joachim’s picture

> @others
> Being able to choose another widget to be used for selecting sounds good. Make it work, and I can make the code pretty afterwards.

You said something about an actions API further up. Could you roughly sketch out how you envisage that being put together?

jddeli’s picture

Perhaps the best way is to use are:
1. Put two variations.
a). A Final Product reference with Check boxes/radio buttons to select existing products.
b). A variations with Inline entity form to create new products.
2. After we create new products with b.
3. And we choose the product with a)
4. In the manage display we show only the a) approach

andyg5000’s picture

Has anyone other than @bojanz (I think translates to busy man) started to work on this? If so, message me and I'd like to see where we're at with it and how we get the ball rolling. I talked to @rszrama about adding a new button for "Add existing variation" that brings in a product autocomplete like the on on an order edit form. This seems like a logical approach and is inline with comment #1. However, I'm not clear on the actions api that @bojanz specified, so if anyone has thoughts on that it'd be great too. I think solving this issue will greatly increase the intuitiveness of product displays. Let's make it happen!

bojanz’s picture

As I said, forget about the Actions API for now, just make something that works :) I'll try to work on IEF issues this weekend and solve some surrounding problems.

andyg5000’s picture

Status: Active » Needs review
StatusFileSize
new15.34 KB

I've created a patch that allows you to assign an existing product SKU through the inline entity form. It extends hook_inline_entity_type_info() by adding a new callback 'existing form'. If that callback exists then the module adds a new button for adding an existing variation. Validation makes sure that the SKU is an actual product and restricts duplicate references. I updated the commerce_product entity type in this module, but not the commerce_line_item type.

andyg5000’s picture

Same as #21, but cleaner patch

philipbe’s picture

Thank you andyg5000!

Patch works for me.

bojanz’s picture

Status: Needs review » Needs work

This will need a reroll to work with the latest code.

Thanks for the work so far, andyg5000!

mnislamshihan’s picture

Hi andyg5000, could you please make the patch compatible with version 7.x-1.0-beta2 of IEF. I tried to apply the patch over the source of 7.x-1.0-beta2 release and the patch failed with message:

Checking patch includes/commerce_product.type.inc...
error: includes/commerce_product.type.inc: No such file or directory
Checking patch inline_entity_form.module...
error: while searching for:
      'default fields' => 'inline_entity_form_commerce_product_default_fields',
      'form' => 'inline_entity_form_commerce_product_form',
      'delete form' => 'inline_entity_form_commerce_product_delete_form',
    ),
    'labels' => array(
      'add fieldset' => t('Add new product variation'),
      'add button' => t('Add variation'),
      'save button' => t('Save variation'),
    ),
    'empty text' => t('No product variations have been created. At least one variation is required.'),

error: patch failed: inline_entity_form.module:20
error: inline_entity_form.module: patch does not apply

Alternatively, could you please mention the version number of IEF for now, on which the provided patch can be applied??

andyg5000’s picture

@mnislamshihan that patch was made on this commit http://drupalcode.org/project/inline_entity_form.git/commit/d38db73 . I hope to rewrite the patch on the current HEAD, but I need to have chat with @bojanz before moving further. It will probably be the first of next week before I can post it if someone doesn't beat me to it.

mnislamshihan’s picture

Thanks a lot @andyg5000. It worked this time :-)

JulienF’s picture

Hello there,

Just my two cents but here, I think, would be a good way to go:

A module is on the net (called autocomplete Product Reference Widget but I can't manage to find it on Drupal.org) here is the link to it: http://www.duckzland.com/content/drupal-7-commerce-create-better-product...

This module offers a very nice widget to select existing products and add them to a Display. We even could customize it to only show Products on the upper table when a certain condition is met (like only the products that haven't been referenced yet).

I think a mix in between IEF and this module would be great.

1. Showing the "Adding existing product" Widget by default and then showing the IEF form when an "Add new product" is being pressed.

2. As an option we could even think of integrating IEF with tokens in order to automatically fill some fields with Tokens (configured in the Edit Field page) and hide those fields from the Product Edit page.

I'll personnally need the First point in a project and I'll work on it, if anyone want to join the effort feel free!

For the second point, eventhough I think it would be of great help, I don't need such functionality right now (some values can be automatically filled with rules on the creation of the entity) so I'm not planning on working on it right now.

Cheers,

bojanz’s picture

@JulienF
None of those are tasks for IEF. Feel free to create a new module and explore the UI you describe. As always, 10 users == 10 approaches :)

andyg5000’s picture

Here's an updated patch that works with the new changes mentioned in #24.

Known items that may need to be addressed:

  • LANGUAGE_NONE needs to be changed in several places
  • Entity autocomplete needs to be run through validateAutocompleteInput() or similar if the submitted value doesn't contain the entity id in parenthesis.
  • For the entityreference autocomplete, I used NID. This will need to be changed to be more dynamic to match whatever the id type should be for the parent entity (lines 661 - 665)
nelslynn’s picture

Status: Needs work » Needs review
StatusFileSize
new75.82 KB
new74.25 KB

This is awesome... Thank you andyg!

Here's a suggestion to improve, or maybe I'm missing something...

  • When I add a new product display node the IEF defaults as open and the "Attach an existing product" button is not visible. The user has to know to click "Cancel" in order to see the "Attach an existing Product" button. (see screenshot-default view when adding a node)
  • When I "edit' a product display node, the form looks great, the "Attach an existing product" button is visible. (see screenshot-default view when editing a node)
andyg5000’s picture

Hey nelslynn,

Thanks for the review and feedback. I think that the first item you mentioned needs to be a separate issue. It's easy to remove the code that shows the form if there are no references, but if the reference is a required field then no validation is done. We'll need to come up with a validation hook to check for entities in the array if it is a required field.

As for the second suggestion, both the add new and attach existing buttons are visible whenever an entity reference is being edited. I'm guessing your second screenshot is supposed to show this, but it must have been cropped too small. From a UI perspective, I don't see that hiding the add and attach buttons would make the widget any more intuitive.

Thanks,
Andy

andyg5000’s picture

Here's an update to the patch that takes care of the issues I mentioned in #30. It would still be good to run the entityreference submit value through validateAutocompleteInput() so that submissions made without selecting an autocomplete result can still be looked up, but I don't think that's major. I also went ahead and removed the code that draws the add form when there are no entities (#31). We'll need to create another issue to handle validation if it's a required field. This patch also cleans up the attach form and processing functions quite a bit. More reviews please!

joachim’s picture

Status: Needs review » Needs work

Minor things: there's a few code style issues such as missing spaces near 'if' and brackets, and a coddled 'else'. Comments need to end in full stops.

Other things:

+++ b/inline_entity_form.module
@@ -603,6 +610,139 @@ function inline_entity_form_process_entity_form(&$entity_form, &$form_state) {
+ * Processes an entity attach form submission.

This appears to be an element validate callback, so should be described as such. 'Process' means something specific in FormAPI.

+++ b/inline_entity_form.module
@@ -603,6 +610,139 @@ function inline_entity_form_process_entity_form(&$entity_form, &$form_state) {
+  if ($entity_form['#entity_type'] == 'commerce_product') {
+    // Load commerce_product entity by SKU
+    $attach_entity = commerce_product_load_by_sku($existing_entity);
+  } else {
+    if (!empty($existing_entity)) {
+      // Take "label (entity id)', match the id from parenthesis.
+      if (preg_match("/.+\((\d+)\)/", $existing_entity, $matches)) {
+        $entity_id = $matches[1];
+        $load_entity = entity_load($entity_form['#entity_type'], array($entity_id));
+        $attach_entity = $load_entity[$entity_id];
+      }
+    }
+  }

This should be moved out to the controller for the Commerce product entity rather than the base module code.

Presumably it's that that's showing the SKU rather than the product title once I click an item in the autocomplete dropdown.

joachim’s picture

Actually, the autocomplete should probably be per-field type, not per entity type.

Currently, the autocomplete isn't working at all for inline nodes with this patch: #1658056: Add node integration.

One more thing: does the bundle dropdown button affect the 'add another' button? Because they are all in one line, it could seem like it does.

joachim’s picture

The reason the autocomplete doesn't work for nodes is that the entityref autocomplete path expects an entity ID too, before the actual string to match on:

function entityreference_autocomplete_callback($type, $field_name, $entity_type, $bundle_name, $entity_id = '', $string = '') {

This is done by _entityreference_autocomplete_validate() being on the autocomplete element.

So definitely one to do by field type.

bojanz’s picture

Status: Needs work » Needs review

The patch is good enough for now. I'll tweak it myself prior to committing.

Thanks for the review, joachim.

joachim’s picture

Here's a patch that fixes everything in my last few comments, apart from these:

> This appears to be an element validate callback, so should be described as such. 'Process' means something specific in FormAPI.

On second look, that's a problem in the module prior to this patch ;)

> One more thing: does the bundle dropdown button affect the 'add another' button? Because they are all in one line, it could seem like it does.

I'm not sure what to do about this. Thoughts?

I've had to add a 'field_type' property to inline_entity_form_field_widget_settings_form(), as we need to know the base field type in the various handlers this patch adds.

joachim’s picture

Updated patch; there was an undefined var error being produced by my copying and pasting code :/

joachim’s picture

Had a few thoughts about this, which shouldn't hold this patch up as it's pretty vital, put possible future refinements:

- make the widget for adding existing entities pluggable
- piggyback existing widgets from the field type

(I'm partly motivated here by thoughts on how to port image module's image attach to D7, and for that I always figured a horizontal film-strip of images would be a really nice widget to have for selecting existing images to attach.)

dave reid’s picture

re #40: That also sounds very similar to what Media is doing with the Media browser widget.

toby53’s picture

Excellent job !

dianikol’s picture

Is the patch from #39 committed to the the dev version or should i apply it? :)

EDIT: The product title is not there after applying the patch. It takes the node's title. Is it possible to save titles for different variations?

andyg5000’s picture

@dianikol The patch shouldn't cause that. Go to edit for the field under manage fields for your product display node and uncheck "Auto generate the product title"

dianikol’s picture

Yes, I missed that.. Thanks for the patch. It shows two notices though when i try to attach an existing product. But it works pretty nice.

The warning are these:
Notice: Undefined variable: delta in inline_entity_form_attach_entity_form() (line 674 /home/wwwhomep/public_html/drupal/sites/all/modules/inline_entity_form/inline_entity_form.module).
Notice: Undefined variable: delta in inline_entity_form_attach_entity_form() (line 685 /home/wwwhomep/public_html/drupal/sites/all/modules/inline_entity_form/inline_entity_form.module).

brycesenz’s picture

I can confirm that the patch in 39 is working well for me. I get no notices/warnings though.

Also, the exchange in comments #5-#15 was one of the more amusing things I've seen today.

damienmckenna’s picture

Status: Needs review » Reviewed & tested by the community

Tested out the patch from #39 with Commerce 1.2 on Drupal 7.14 and it works great - no errors or warnings.

jerryitt’s picture

#39 Patch applies cleanly, No errors or warnings and works as expected.

jherencia’s picture

Rerolled to latest git dev version

jherencia’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new10.4 KB
new9.97 KB

Ok, the patch @joachim and others provided didn't work for me, because _entityreference_autocomplete_validate needs the field's settings to have defined match_operator, which is not.

This patch adds the widget setting to define whether the operator is "contains" or "starts with".

jherencia’s picture

There is a bug in entity_reference that prevents the possibility to add an existing node in node_add_form, it works ok on node_edit_form.

See #1706664: Autocomplete fails with inline_entity_form.

marcin.wosinek’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new0 bytes

I attach rerolled patch from 39. It works as expected, no issue mentioned in 50 noticed. I'm marking it RTBC; because patch works and future fixes will be easier to develop in another issues. It's also blocker for this issue #1717196: Selecting existing entities - integration for nodes.

bojanz’s picture

@marcin.wosinek
You've uploaded an empty patch.

marcin.wosinek’s picture

Oh. Once again.

jherencia’s picture

Status: Reviewed & tested by the community » Needs review

@marcin.wosinek: #50 is a rerolled version of #39 patch with a major bug fixed, so I think it's probably better to review it instead of commiting a partial fix.

To see what #50 explains please install a new Drupal installation and add a new field using entity_inline_form widget, it wont't work.

I'm not using this module in a Commerce environment, so that could be the reason why others have not found the same issues I have.

@marcin.wosinek, could you try #50?

I'll change the status so @bojanz or @rszrama could review it.

marcin.wosinek’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new977 bytes
new5.68 KB

I've tested #50 with clean installation on standard apache + mysql from ubuntu 12.04. I've use case of new node content type referring to articles. As for me #39 and #50 worked the same - in both cases matches where found, and I've manage to save everything. I've checked _entityreference_autocomplete_validate and have not found any hint in code or doc of requirements mentioned in #50.

I believe that there is still work to do on this feature - there are some issues with (#1717196: Selecting existing entities - integration for nodes) when referring nodes; we will probably need some ui for removing entities from list (not deleting entirely); and probably other as well. I just think we can develop solution for this emerging issue in other patches, as here we have 50+ comments here, and it's becoming difficult to track differences between patches.

I attach rerolled patch 50, and interdiff of 50 and 39.

bojanz’s picture

@ marcin.wosinek
I'm fine with committing the current progress, but you've given me a wrong patch again.

marcin.wosinek’s picture

Shame on me. Here is double checked patch.

jherencia’s picture

That's #39 it has the same problems I said in #50.

jherencia’s picture

StatusFileSize
new10.08 KB

Here is the rerolled version of #50.

marcin.wosinek’s picture

Both patches - #58 & #60 are RTBC.

jherencia’s picture

Status: Needs review » Needs work

This does not work on nested IEFs, I'm working on a patch right now, in few minutes I'll post the patch.

The reason is that in the autocomplete options IEF gives the parent's options, not the nested ones. This happens because we are giving the parent's ID in autocomplete path.

jherencia’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new10.13 KB
jherencia’s picture

Status: Needs work » Needs review
daniel kulbe’s picture

Status: Needs work » Needs review

Notice: Undefined variable: delta in inline_entity_form_attach_entity_form()

row: 686, 697

Anonymous’s picture

#63 works great for me thanks. I don't get any Undefined variable notices either (though a quick inspection of the code shows that I probably should be... I must just have disabling displaying PHP notices).

Daniel - did the patch work for you apart from the Notice? Seems like it's harmless, and would be good to get this committed.

Anonymous’s picture

I just got the same Notice as Daniel, after using the patch for a while. Steps to reproduce:

1. Click edit on a Product Display node
2. Click edit on a variation and then save that variation (no changes necessary)
3. Click "attach existing varation"
4. Click main save button at bottom of page
5. You get validation error: "Variation field is required"
6. Click cancel on "attach existing variation" form
7. Click "attach existing varation"

jherencia’s picture

Assigned: Unassigned » jherencia
Status: Needs review » Needs work

Ok, let my try to fix this.

jherencia’s picture

Assigned: jherencia » Unassigned
Status: Needs work » Needs review
StatusFileSize
new10.16 KB
new10.62 KB

This should work.

dgastudio’s picture

using 1526084-69-am.patch from #69.

trying to search existing entity return popup js error:

An AJAX HTTP error occurred.
HTTP Result Code: 403
Debugging information follows.
Path: http://fc.ua5444.krypton.vps-private.net/entityreference/autocomplete/single/field_event_place/node/event/
StatusText: error
ResponseText: 
Access denied | ForeCast
....
...
...

maico de jong’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta4
StatusFileSize
new9.96 KB

Attached patch works for me with latest beta4 version. (Beta4 is newer then latest dev)

dgastudio’s picture

testing latest patch

curl http://drupal.org/files/inline_entity_form.module.patch | git apply
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10195 100 10195 0 0 10824 0 --:--:-- --:--:-- --:--:-- 13223
:9: trailing whitespace.
'match_operator' => 'CONTAINS',
:17: trailing whitespace.
$element['match_operator'] = array(
:18: trailing whitespace.
'#type' => 'select',
:19: trailing whitespace.
'#title' => t('Autocomplete matching'),
:20: trailing whitespace.
'#default_value' => $settings['match_operator'],
warning: squelched 169 whitespace errors
warning: 174 lines add whitespace errors.

-------------

the patch is applied and works fine! thank you

jherencia’s picture

Alright, the problem is that the dev version package does match with Git's dev version. My patch works in git branch 7.x-1.x.

forward-media’s picture

Works perfekt for me with Beta4!!

Thanks!!!

itsekhmistro’s picture

Works fine. I believe the solution should be applied into the Module.

daniel kulbe’s picture

It should only be applied when something like this works ...

bojanz’s picture

Title: Abilty to select from existing product entities » Abilty to add existing entities
Status: Needs review » Fixed

Worked on my own version based on the latest patch, and committed it:
http://drupalcode.org/project/inline_entity_form.git/commitdiff/087b72b?...

Changes:
1) The functionality is now optional, disabled by default.
2) Not available at all for line items (since it makes no sense and the line item reference field has no auto complete).
3) Works with entityreference + nodes too.
4) Uses our own autocomplete code, which leads to simpler code, and the match operator actually being used (previously it was ignored for products).

Referenced entities are just unliked if deleted before the parent form is saved.
After the parent form is saved, clicking "Delete" will permanently delete the entity.
This means it's now critical to solve #1617886: Remove entity without deleting. Please give your opinion there.

Thanks to everyone involved!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

heyyo’s picture

It will be great to have also the possibility to have also checkbox option and not only autocomplete

bojanz’s picture

Patches welcome.

maxplus’s picture

Yes, great work already!
The ability to use a select list or checkbox to select existing nodes would be great indeed

summit’s picture

Hi, adding to this would hierarchical select (http://drupal.org/project/hierarchical_select) ability be absolutely awesome!
Greetings, Martijn

mihai7221’s picture

Hi, the last patch doesn't work, it gives me this error:

patching file commerce_line_item.inline_entity_form.inc
Hunk #1 FAILED at 45.
1 out of 1 hunk FAILED -- saving rejects to file commerce_line_item.inline_entity_form.inc.rej
patching file entity.inline_entity_form.inc
Hunk #1 FAILED at 115.
Hunk #2 FAILED at 129.
2 out of 2 hunks FAILED -- saving rejects to file entity.inline_entity_form.inc.rej
patching file inline_entity_form.module
Hunk #1 succeeded at 104 with fuzz 1 (offset 95 lines).
Hunk #2 FAILED at 302.
Hunk #3 FAILED at 319.
Hunk #4 succeeded at 704 with fuzz 1 (offset 230 lines).
Hunk #5 FAILED at 516.
Hunk #6 succeeded at 946 with fuzz 2 (offset 420 lines).
Hunk #7 FAILED at 562.
Hunk #8 FAILED at 708.
Hunk #9 FAILED at 719.
Hunk #10 FAILED at 789.
7 out of 10 hunks FAILED -- saving rejects to file inline_entity_form.module.rej

I applied the patch correctly, in the working directory. Maybe I get this because I use version 1.1 ?

EDIT: Shame on me, this was included in the last version, I didn't looked in the configuration of the field, just a box to check and everything was fine.

bdreispringer’s picture

with the latest patch applied together with 7.x-1.5 the autocomplete gave me always

Array(bundletype). (Where bundletype was the node content type)

I had to the autocomplete function here:


	foreach ($entity_labels as $bundletype => $entities) {
		foreach ($entities as $entity_id => $label) {

So the part in the code looks like

  elseif ($field['type'] == 'entityreference') {
    $handler = entityreference_get_selection_handler($field, $instance, $settings['entity_type']);
    $entity_labels = $handler->getReferencableEntities($string, $type_settings['match_operator'], 10);
	foreach ($entity_labels as $bundletype => $entities) {
		foreach ($entities as $entity_id => $label) {
		  // entityreference has already check_plain-ed the title.
		  $results[] = t('!label (!entity_id)', array('!label' => $label, '!entity_id' => $entity_id));
		}
	}
  }

muntjac’s picture

Issue summary: View changes
Status: Closed (fixed) » Active

Resetting this to active since the patches break. This would be a good feature.

bojanz’s picture

Status: Active » Closed (fixed)

As #77 says, this work was committed on September 17, 2012. I have no idea why you are attempting to apply a patch.

tahiticlic’s picture

Hi,

if no patch is needed, maybe one can tell how to use this module to add an existing entity into Entity Reference field.

My settings :
Module version : 1.5
Field widget : inline entity form - single value
Delete referenced nœuds when the parent entity is deleted : unchecked
Override labels : unchecked

Behavior :
When editing the main node containing the entity reference field, this field is directly replaced by a form to create a new entity. No way to add an existing one.

What am I missing ?

[Edit] : I should select multiple values, which is a bit confusing since we can have a multiple values widget on a single value field...

kcannick’s picture

@Tahiticlic and anyone who stumbles on this post after the fact...

Once the widget is changed to inline entity editor, you will have an option in the field properties to ADD EXISTING PRODUCTS.

tahiticlic’s picture

@Kcannick : Yes, and as I mentionned, this is only true if you select "Inline entity form : Multiple Values", even for a single value field. That is the confusing point.

njbarrett’s picture

It wasn't obvious to me, but I needed to change the widget and also change the field settings and check the box that says allow users to select existing entities.

fishfree’s picture

@tahiticlic: I was bewildered with the same question. But at last, I found we could use the "Inline entity form : Multiple Values" widget even for a single-valued field! You can have a try!

nkostop’s picture

I would like to ask if it is possible to bulk add existing products. Maybe with a select list instead of autocomplete.
Thanks!

colepacak’s picture

thanks, @fishfrree.