View Full Version : correct multiple checkbox value variables
nexus851
12-14-2005, 01:37 PM
I need the correct 'value' variable for the "multiple selection checkbox"... Rightnow, when i $post[field33], it gives me a number like 1,2,3... (selection choice) instead of the actual value (male,female) that i want... anyone know the correct variable for the value output using the multiple selection checkbox?
i tried $postname[field33], $post[field33], but none of that works =(
please help...
noppid
12-14-2005, 02:48 PM
I think you have to eval what to assign as a value on display.
<if condition="$post[field33] == 1">Text for box one</if>
<if condition="$post[field33] == 2">Text for box two</if>
and so on.
Zowners
04-20-2006, 09:41 PM
or <if condition="$post['fieldX'] & 1">
CODE TO DISPLAY IF OPTION 1 IS SELECTED
</if>
<if condition="$post['fieldX'] & 2">
CODE TO DISPLAY IF OPTION 2 IS SELECTED
</if>
<if condition="$post['fieldX'] & 4">
CODE TO DISPLAY IF OPTION 3 IS SELECTED
</if>
<if condition="$post['fieldX'] & 8">
CODE TO DISPLAY IF OPTION 4 IS SELECTED
</if>
<if condition="$post['fieldX'] & 16">
CODE TO DISPLAY IF OPTION 5 IS SELECTED
</if>
<if condition="$post['fieldX'] & 32">
CODE TO DISPLAY IF OPTION 6 IS SELECTED
</if>
<if condition="$post['fieldX'] & 64">
CODE TO DISPLAY IF OPTION 7 IS SELECTED
</if>
<if condition="$post['fieldX'] & 128">
CODE TO DISPLAY IF OPTION 8 IS SELECTED
</if>
mikeclarke
04-21-2006, 05:00 AM
Thanks for the help.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.