By unifiedac on
Hello,
I've created a custom field (field_interests) in the user profile configuration. This field is a List(text) type with several options shown as check boxes. The following options are:
Soccer
Football
Baseball
Hockey
Each user of the site can choose any or all of the options, which are then used on the front end of the site. I want to display all of the available options and use CSS to style the options that are checked (true).
HOW DO I:
- Render the list of options directly in user-profile.tpl.php?
- Check whether each field is true/false?
All my other fields render fine using the following format:
<?php print strip_tags(render($user_profile['field_name'])); ?>
I'm sure it has something to do with the list field type that I'm not getting. Thanks for reading!
Comments
Solution
Here was my solution: