Closed (fixed)
Project:
Field reference
Version:
7.x-1.1
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Jul 2012 at 15:53 UTC
Updated:
13 Apr 2018 at 08:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
danielb commentedI don't remember adding such a feature. It is just a sort of the ID of the field, not the contents of the field. Such a feature would have to have a fair amount of flexibility/configuration behind it as there can be many ways to interpret what the value of the field means.
Comment #2
johnhanley commentedI agree with the OP. The exclusion of the actual field values severely limits (or completely eliminates) the usefulness of this module.
Here's my scenario.
I have 2 content types:
Group
Project
Group includes a field collection called Member consisting of 3 fields:
Full name
Telephone
Email address
Project includes a field reference to "Full name" of field Member.
When creating a new project node the field reference dropdown includes cryptic delta option values instead of the actual field values.
For example:
Full name (value 1) - Members 1
Full name (value 2) - Members 2
instead of
Mickey Mouse
Donald Duck
The field reference settings page knows the name of the field so it seems reasonable that the actual delta field values could be retrieved with an extra join.
I'm willing to investigate this and provide a patch, but it just seems strange that this issue wasn't raised a long time ago. This really should be considered a bug report, not a feature request.
Comment #3
drupalok commentedtotally agree with bacteria-man (cool username by the way :) )
to make this user-friendly, there it must be possible to see the field values... i am really looking forward to this patch!
Comment #4
johnhanley commentedI opted to go a different direction and therefore won't be devoting the time to create a patch, but perhaps the maintainer could devise a way to make this happen. Incorporating the use of tokens to define labels would be cool.
Comment #5
drupalok commented@ bacteria man
what was your different way? did you find another solution?
thanks!
Comment #6
sydkoh commentedYes... the lack of a specific field value does render this module useless.
To the lay person using your website. [Node-title and value 1], won't mean anything useful.
TO BE SPECIFIC.
1. Create a content type
2. Add a text field to this content type called "MONTH"
3. Add 'field reference' field to this content type called "MONTH2"
4. When a user wants to add content and types "JANUARY" into field "MONTH"
How do you get field "MONTH2" to display "JANUARY".
Maybe this can't be done, but I don't understand how to do this with this module or if it's even possible.
Comment #7
kaizerking commentedwe must be able to select field value it will be ambiguous as the user may not know what the selection means some time we may change the title of the entity/node if required. and entity id or
in my case as shown in the screen shot the suer will not see the work expereince title infact he should only see the field value.
I am not able to save multiple values even the field is set to accept unlimted values
Comment #8
handrus commentedI'm not very happy with this solution yet, but this patch shows the entity value instead of the delta.
This also add a option "Hide reference label".
The function field_reference_label_create receive this variable (default to FALSE) as a second parameter and use it to hide the label.
It solved my problem and hopefully can be reference for a better work.
Comment #9
peijun commentedThe bug is that variable $delta are used twice in the function field_reference_field_formatter_view. First it is used to represent the delta of the field and then it is used to represent the delta of referred field. Solution, rename the second $delta to anything else (such as $referred_field_delta).
peijun
Comment #11
danielb commentedI've added your patch with some changes. It may not be perfect but it's a better jumping off point than where it was already.
Comment #14
maul commentedThis issue still exists in 7.x-1.1 version. Value of field is not shown.
-- edit: we can show value of field by implementing hook_field_reference_labels_alter(&$refs, &$references).