Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Mar 2011 at 01:47 UTC
Updated:
7 Apr 2011 at 04:21 UTC
Hi,
I'm manually calling a view to create list of checkboxes for a form. One field in my node is a select list (1 | First, 2 | Second - for example), if I preview the view in the views ui it shows the value 'First' for my field.
However, when I manually call the view with views_get_view, add any args, then call view->execute(), in the result I get the key ie. 1 & 2 instead of First & Second...
Most likely another rookie mistake, but I've spent a while looking into it with no joy, so I thought I'd ask the experts. Thanks for your time and I'd appreciate any feedback.
Comments
Comment #1
merlinofchaos commentedYes, the result contains the raw database keys. What you probalby want is to call $view->render and then look at $view->style_plugin->rendered_fields
Comment #3
jdeg commentedThis is usually useful when we need to get the path of an image field.
Thanks!
Comment #4
Steven.Pescador commentedShoulda said this earlier too.... Thanks Merlin of Chaos.