Okay I miss understood your question, but now I understand what you want to do and why your having problems. I'll try to explaine it the best I can. The value that that variable holds is going to be a number. It uses vBulletin bitfields to set the number depending on the users input. Heres an example.
Lets say the question for that option is "What is your favorite Color". Then we have 5 checkbox options for the user to check from; allowing users to select multiable choices.
- Red = (option 1) value = 1
- Yellow = (option 2) value = 2
- Green = (option 3) value = 4
- Orange = (option 4) value = 8
- Pink = (option 5) value = 16
See a pattern? Each option/answer multiplies into each other to determine the next value. 1,2,4,8,16,32,64, etc...
So.....
Single Selections
if a user selects Red (option1) then the value is stored in the database, the value is 1.
if a user selects Yellow (option2) then the value is stored in the database, the value is 2.
if a user selects Green (option3) then the value is stored in the database, the value is 4.
if a user selects Orange (option4) then the value is stored in the database, the value is 8.
if a user selects Pink (option5) then the value is stored in the database, the value is 16.
Mutiable Selections
if a user selects Red (option1) and Yellow (option2) then the value is stored in the database, the value is 3 because the values of Red and Yellow = 3 ( 1 + 2 = 3)
if a user selects Green (option3) and Orange (option4) then the value is stored in the database, the value is 12 because the values of Green and Orange = 12 ( 4 + 8 = 12)
if a user selects all the options then the value is stored in the database, the value is 31 because the values of all the colors together = 31 ( 1 + 2 + 4 + 8 + 16 = 31)
This seems like a cheap way to add the templates, but you can do something like.
You must first be a
registered member to view any code.
Or
You must first be a
registered member to view any code.
There has to be a better way, but I havn't dug that deep into this yet.