Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
node data
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Jul 2009 at 12:15 UTC
Updated:
2 Dec 2009 at 21:10 UTC
Let's say you have some nodes with fieldA, fieldB, and a radiobutton-widget. In each node, using the radiobuttons, you can chose which of the fields is supposed to be presented.
node 1: fieldA="Good", fieldB="Hello", radiobuttons: Not selected - Selected
node 2: fieldA="world", fieldB="bye", radiobuttons: Selected - Not selected
Is it possible to create a view with a table in which only one of the two field entries is shown depending on the radiobutton selection?
views-page:
fieldA/B
"Hello"
"world"
Comments
Comment #1
papricus commentedComment #2
dawehnerYou could do this with custom theming. Justing using a different sql is afaik impossible.
Comment #3
dagmarYou can use Views CustomField
The PHP code for this extra field can be something like:
You have to exclude Field A, and Field B from view in order to see only one value.
If it works, please change status to fixed.
Comment #4
papricus commentedThanks