0

I have an author content type. I have a book content type.

I associate multiple books with an author by having a books paragraph field in the Author create / edit form.

In my Book Paragraph field I have an Entity Reference field - Book - which is a select (with Chosen module functionality enabled for searching).

When I select options from this field, I can only view the name of the book.

What I want to do is see

name of the book / date published / pages

Just as a simple concatenated string.

Is there any way to override the node label as what is displayed by default in an entity reference field?

I have tried the following on Drupal 8.6.10 with no success:

Show node IDs along with titles in Entity reference Autocomplete list

How to display fields of an entity reference field?

I've also attempted to add it directly to the form select twig template, but have no access to the book node information from there.

Both these result in the book node label only being displayed in the entity reference select dropdown.

I'd be very grateful for any help.

Your Answer

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

Browse other questions tagged or ask your own question.