Hi,

before all sorry for my English, I hope you will be able to understand what I'd like to say (I am Italian).

I am getting trouble to understand how this module works: I need to add values for an entity referenced through an entity reference field while creating the node that should reference the new "Entity value".

But after installing and enabling the module it seems that nothing changed: entity reference fields are just like before using this module!

I tried to reference nodes and/or users (with different fields), but the result is always the same: the module doesn't seem to work correctly!

But I am sure I am missing something: can you please help me? It's really important for me to implement this feature on my website!

Ah, I was forgetting: I am using Drupal 7.12...

If you need more details and/or clarifications please do not hesitate to ask me for further information! :-)

Thanks in advance!

CommentFileSizeAuthor
#3 ref_diag_screenshot.png67 KBrwilson0429
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rwilson0429’s picture

Yes, I also initially struggled with finding any documentation on how to use the Entity Reference Dialog module. The project page gives a little hint:

This module extends reference fields like the user and node reference fields by adding links to add, edit and search for references through a dialog. This allows for a workflow where the user can create all the references to a node at the same time as she is creating it ...

To use this module, you should have a content type that has a reference field (i.e. Entity Reference or Node Reference). This module uses the Views module to create a new display type of Reference Dialog. The Reference Dialog View display adds links (add, edit and search) to your content type node edit displays.

After installing the Reference Dialog module

  1. Go to /admin/structure/types/manage/[your-content-type]/fields/[your-entity/node reference-field]. The Reference Dialog module adds a 'Search Option' to the content type field configuration page. Enable the Search Option. It also adds a 'Views - Nodes that can be referenced' section, ignore this section for now.
  2. Create a View that filter by content type of the nodes that are referenced by your reference field above, then on the Views configuration page under the Add Display drop-down, select "Reference Dialog search".
  3. Configure (add fields to be displayed to users when adding/editing content) the Reference Dialog display. This is the dialog the user will see when adding and editing content. Generally, at a minimum, you want the Title to be one of the fields displayed in the view. Select the layout and exposed filters you want to present to the user. I suggest that none of your displayed fields link to content since you normally won't want content to be displayed when the user clicks a node title, for example.
  4. Under the References Dialog section of the View, click the Attach To link and select the content type(Field Instance and your Node Reference field) that contains the reference field.
  5. Save your View.
  6. Go back to your Content Type and edit your node reference field (/admin/structure/types/manage/[your-content-type]/fields/[your-entity/node reference-field]). Now you should see your Reference Dialog view in the drop down box at the bottom.

Perhaps there are better ways to do this but, the above steps worked for me.

falcon03’s picture

Hi rwilson0429

thanks for your reply...

I tried to apply your suggestions, but I am not able to find the "search" option to enable. In "Entity selection mode" I can only choose "simple" (the default value provided by Entity Reference).

I really don't understand what I'm doing wrong...

rwilson0429’s picture

FileSize
67 KB

After enabling Reference Dialog module, go to 'admin/structure/types/manage/[your-content-type]/fields/[your-reference-field]'. Your reference field configuration page should look like below. If it doesn't clear all your caches.

reference dialog reference field screenshot

manuelBS’s picture

I have the same problem, Git diff shows that the code for handling entity references doiesnt exist any more. Will there be no support for entity references in the next release?

lubnax’s picture

Worked with Reference dialog 7.x-1.0-alpha3 + Entity reference 7.x-1.0-beta3
But I had the same pb with the search dialog link not showing.
Everything went ok after i created a view with a reference dialog display and attached it to the entity reference field of my content type.
And this BEFORE flushing cache and returning to field management in the content type. Then link appeared.
And one other thing, if using fields (instead of teaser) in the view, you've got to provide a nid field or won't work.
hope that helps.

ramsegal’s picture

I had the same issue.
You have to choose autocomplete as widget, then after refreshing the reference field settings page you will see the options for "search, edit, add" ...

Danny Englander’s picture

Thanks for the documentation for this, I was really struggling for a solution and then found this module and issue queue. I am wondering if it will possible in the future to have a select list work with this instead of auto-complete or is there something inherent such that it won't work that way and so auto-complete is the only way this will work.

rwilson0429’s picture

@ highrockmedia, not quite sure how good a search would be with a select list. But someone with more technical knowledge of this module may be able to help you with that.

In the meantime, if you want a select list for selecting your referenced node, I believe the Entity Reference Module has a patch to do that. You may want to check out this issue, Add views support for providing a list of entities or bundles (views filtering, relationships, etc). Check out post #159 and the patch in post #192.

Danny Englander’s picture

@rwilson0429 - ah yes I see your point. Actually after setting up and using the autocomplete method for a few days now, this is really nice.

kaizerking’s picture

I am too dumb and not getting how to do,
I have a content type job, which has a term reference field_organization
I have a content type organization.
I am using NAT module to which will create a term with the title of the node of organization when i create organization node
So, if user doesn't find the name of the organization, he will create a node, which will automatically create a term,, What i want is a link which will pop up a overaly to create organization.

Please help

saveriop’s picture

The widget do not activate if you use reference from url widget!

I'm using the "reference from url" widget and autocomplete as Fallback behavior.
I would like to have reference dialog when a user create a new content from scratch (node/add/...)

rogical’s picture

Status: Active » Closed (works as designed)

If you're using reference from url, the field value would be taken cared by the url, while reference dialog is purely manually, if you insist on doing them together, we need a clearer logic and better to open another issue.