Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
Actual value instead of label displayed in views.
In blah => t('Blah')
, "blah" is displayed in the view instead of "Blah".
Comment | File | Size | Author |
---|---|---|---|
#6 | 0001-858704-by-mradcliffe.-Add-field-formatter-for-list-f.patch | 1.85 KB | mradcliffe |
Comments
Comment #1
mradcliffeThis is because views grabs labels from allowed values. May need to override this specifically.
Comment #2
mradcliffeThis is tricky. It looks like I'll have to alter views data via hook_views_data_alter. I cannot effect a field's views data from the widget side. It'd be nice if there was a hook_field_settings_alter, but I guess that would slow things down.
Comment #3
mradcliffe#957342: Exposed View widget not showing as Selectbox marked as a duplicate of this issue.
Edit: no, it's similar, and would require similar work around in views.
Comment #4
mradcliffeThis should be fixed in the dev version.
Comment #5
Scryver CreditAttribution: Scryver commentedThis still happens in version 7.x-dev. I'm working with panels, but only when I make the field editable it displays the right label, else it will display the key.
--Edit: It is not only in panels it's every where the field is displayed. Is it the hook_field_formatter_view() that is missing?
Comment #6
mradcliffeThank you for the suggestion, Scryver. field formatter is the correct way to go here.
This patch is for 7.x-1.x
Comment #7
mradcliffeCommitted and pushed to 7.x-1.x branch. http://drupalcode.org/project/cck_select_other.git/commit/484f831