0
votes

I have a form on a node, that displays 2 fields that are entity reference fields from the current node page. It shows the correct info on the label of the fields, but as soon as you save the form, it saves the nodes title and not the correct info.

See screenshot at https://www.dropbox.com/s/rwj1lu1d34zgb53/ScreenshotEntityform.jpg

I don't know PHP or how to mod/write a Drupal module, I just need some guidance as to if this is possible and how to do it, so any help would be really really great, thanks.

1

1 Answers

0
votes

There is a setting to edit how an entity reference field is displayed.

If you go to Structure > Content Types > Your Content Type > Manage Display then you will see a select box to control the format of each field.

The entity reference field will let you choose between either label, entity ID or rendered entity. It sounds like at the moment it is set to label so is showing the node title. If you set it to show the rendered entity then it will show all fields that belong to the referenced entity.

The easiest way to hide fields you don't want displayed would be to install the Field Permissions module. This will give you a setting for each field that allows you to choose who can see it. If you don't want to use the Field Permissions module you could create a custom template but it sounds like your trying to avoid that...