XF 1.5 Custom Fields – Multiple Choice Fields in Custom Templates

Freelancer

Well-known member
I use custom multiple choice fields in certain custom templates with XF1 core and add-ons to show summaries or lists of certain content.

Now I encounter one problem with custom fields that have multiple choice values: When I insert them as $field.fieldID they render the value instead of the text that is associated with the value.

For example: a $field.petOwned comes with multiple values like $petDog, $petCat, $petMouse etc but when I insert it into a custom template it renders "petDog" (the value) instead of "Dog" (which is the associated text).

What am I doing wrong here? Is there some special {xen:something} I need to incorporate to make it display the actual text and not the value?
 
That is what I do, I kept the example pretty general because it is for many applications, not only user fields but other add-ons too.

My question was: Why does the template render the "value" (like "petDog") and displays it instead of the actual text associated to the value (which is "Dog" obviously)? I need to display that text and not the value. It works with other types of custom fields but not with multiple choice fields.
 
That is what I do, I kept the example pretty general because it is for many applications, not only user fields but other add-ons too.
It wasn't really clear so I went with how you can usually get custom user fields to show. Without knowing more detail it is hard to guess what needs done. Are the templates be included with a template that has the $user record available to it? Can you post an example of your template?
 
Back
Top Bottom