2

I want to add a user reference field to an "event" content type, and reference the user who will present.

But I wonder how to change the entity reference - I've tried using the "filter by an entity reference view" with a view I created, but it still only shows the username.

2

Similar to Show node IDs along with titles in Entityreference Autocomplete list except in the rewrite of your user name field use {{field_first_name}} {{field_last_name}} and you need to add those fields ABOVE your user name field, in order to get access to those replacement patterns.

  • I followed the example step by step, and my autocomplete list is still only showing the normal usernames [e.g., pparker, jjj666, maryjwhat, etc.] and not the full names. In D8, in my entity reference view username is rewritten as "{{ field_first_name }} {{ field_last_name }}", and the format settings are definitely set for the search fields to be that field. So I'm not sure what's wrong... Also, I have cleared the cache several times. – W0LF May 21 '16 at 8:12
  • @W0LF ok, I will try this out in D8. – No Sssweat May 21 '16 at 8:15
  • 1
    humm... looks to me that this is a D8 bug. I will try this in D7 to double check – No Sssweat May 21 '16 at 8:30
  • 1
    After doing a search, this has been reported already Entity Reference inline fields not working as expected – No Sssweat May 21 '16 at 8:52
  • 1
    Well shucks - I'll just follow that report until a temp patch or update to fix it in views is committed. Thanks for checking into it as well! – W0LF May 21 '16 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.