The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Profile Field Options
Does anyone know the values assigned to options
when using the multiple-selection checkbox option? I was making a profile field of Attendance for Events. Field: League Attendance: Option 1 Option 2 Option 3 Option 4 I know how to add a conditional for the field to a template. <if condition="$post[fieldX"> do something </if> What I was attempting to achieve was a multiple conditional dependant upon the actual option selection. <if condition="$post[fieldX option1"> do 1 </if> <if condition="$post[fieldX option2"> do 2 </if> Does anyone know the proper way to achieve this? TY |
#2
|
||||
|
||||
Try:
HTML Code:
<if condition="$post[fieldx] == option1">do 1</if> |
#3
|
|||
|
|||
Quote:
My exact profile field addition as follows: [field8] Multiple-Selection Checkbox titled 'League Attendance' with 3 options as below. MLG WSVG WCG I have tried both in the template for postbit display: <if condition="$post[field8] == option1"> do something </if> <if condition="$post[field8] == MLG"> do something </if> UPDATE I removed one of the equal signs since there are multiple allowances and it seems to be working great so far. PHP Code:
|
#4
|
||||
|
||||
Okay. Every option has an id for Multipe Selection Checkbox. So, you have to use it like that:
HTML Code:
<if condition="$post[field8] == x"]do</if>
|
#5
|
|||
|
|||
Youre correct.
I was wrong in my original update. By removing the == all it did was allow things to happen without being dependant on the selections. Thank you very much. It works great now by simply providing the number of the option. PHP Code:
Below I will provide my actual postbit_legacy edit to make things easier. I am trying to display an image for each selection. PHP Code:
MLG WSVG WCG EGL hmm... I forgot the options are binary storage so option3 is actually a value of 4 and option 4 is a value of 8. This thread may have the answers. http://www.vbulletin.com/forum/showpost.php?p=725845&postcount=2 |
#6
|
||||
|
||||
Please read this carefully: http://www.vbulletin.com/docs/html/m...e_conditionals
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|