PDA

View Full Version : "{vb:raw post.fieldx" for Multiple Choice Fields


akxt660
04-03-2014, 07:17 PM
Hi!

I have custom profile fields added to the user profile.

I added the following to the postbit_legacy template to display the fields, which is working:

<vb:if condition="$post['field5']"><dt>Model</dt> <dd>{vb:raw post.field5}</dd></vb:if>

However, two of the custom profile fields are "MULTIPLE SELECTION MENU" type fields, and they are displayed as the item number from the list of choices, instead of the text of the item choice.

The fields display correctly in the member list as well as the "about me" section of the user profile.

Is there a way to get the code in the postbit_legacy to display correctly the selected names?

Thanks for any info!

blind-eddie
04-03-2014, 08:47 PM
I cant see your member list or profile pages without registering.
Set up a temp account, pm me info, and I will have a look....

Lynne
04-03-2014, 10:13 PM
It is explained in here - https://vborg.vbsupport.ru/showthread.php?t=250418 which is just a vb4 rewrite of what is in here - http://www.vbulletin.com/forum/forum/vbulletin-3-8/vbulletin-3-8-questions-problems-and-troubleshooting/vbulletin-quick-tips-and-customizations/219498-how-to-add-a-profile-field-to-the-postbit?214234-How-To-Add-A-Profile-Field-To-The-Postbit=

akxt660
04-03-2014, 11:39 PM
Thank for the information! I'll try to be more specific:

I want to show images in postbit, related to the selected options by the user in the Multiple Choice Menu.

The below code works just in "Single Selection Menu:

<vb:if condition="$post['fieldX']"> <img src="{vb:raw post.fieldX}.png" /> </ a> </ vb: if>

But how do I work on Multiple Choice Menus?

In the image below you can view the images, but it performed with the Single Choice Menus:

https://vborg.vbsupport.ru/external/2014/04/48.jpg

In this case the user should select four options in Multiple Choice Menu.
These images refer to flags that users rescued

ozzy47
04-03-2014, 11:46 PM
Follow the guidelines for For Multiple-Selection Menu and Multiple-Selection Checkbox here, https://vborg.vbsupport.ru/showthread.php?t=250418 as Lynne suggested.