Hi,

First sorry for my bad english...
I've installed your module in order to collect a date from another content type :
admin --> publish event with date
user --> choose a date but only dates of admin event publications.
so i 've created a new field with "field reference" + widget "selection list" (+ selection of : "my_admin_content" + "entity" + "Append id").
Form item looks like :
"date - my_admin_content_title [field_date node:10]"
"date - my_admin_content_title [field_date node:12]"
...
How could i have the data of published events (date) instead ?

Thanks

Comments

danielb’s picture

Title: Field name but not value of field » Show value of field in form
Category: support » feature

I 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.

johnhanley’s picture

I 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.

drupalok’s picture

totally 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!

johnhanley’s picture

I 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.

drupalok’s picture

@ bacteria man
what was your different way? did you find another solution?
thanks!

sydkoh’s picture

Yes... 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.

kaizerking’s picture

StatusFileSize
new2.85 KB
new4.61 KB

we 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

handrus’s picture

I'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.

peijun’s picture

The 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

  • danielb committed 6f00a7a on 7.x-1.x authored by handrus
    Issue #1672718 by handrus: Show value of field in form
    
danielb’s picture

Issue summary: View changes
Status: Active » Fixed

I'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.

  • danielb committed 2be94f4 on 7.x-1.x
    Issue #1672718 by handrus: Show value of field in form
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

maul’s picture

Version: 7.x-1.x-dev » 7.x-1.1
StatusFileSize
new14.58 KB

This 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).