Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By slayerment on
Is there a way to show the actual text for a dropdown or multilist item instead of just displaying the number?
I am using something like this:
print $node->flexinode_25
and I will just get a number like 1,2,3 or 4 outputted.
I would prefer to have the actual label for that dropdown be displayed.
I have tried doing:
print $node->flexinode_25->label
but that doesn't seem to work.
Does anybody have any ideas on how I could do this? If I had to I could probably write a bunch of if statements for each item but this seems like it would be a huge waste of time.
Thanks for any help!
Comments
use flexinode_load_field()
you want to use the flexinode_load_field() function.
for example:
that should do the trick (i'm assuming you're talking drupal 4.6, since you're using flexinode at all).
-derek
___________________
3281d Consulting
That worked perfect. Thanks!
That worked perfect. Thanks!