The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Each From with Select Option
field298 Single Line Text Box
Instead of free input I wanted to show a select dropdown to validate input. There were a ton of options, so I created an array, and then looped through the array to create the <options>. A first blank option was also added. Template PHP Code:
HTML Code:
<select class="primary" name="userfield[field298]" id="cfield_298" tabindex="1"> <option value=""></option> <option value="Adept">Adept</option> <option value="Axesworn">Axesworn</option> </select> PHP Code:
|
#2
|
|||
|
|||
You can't use vBulletin template syntax inside of a condition. Now it checks if it literally equals the string '{vb:raw userinfo.title}'. Changing it to the following should work, given that the $userinfo array variable is available.
HTML Code:
<vb:if condition="$bbuserinfo['field298'] == $userinfo['title']">
|
#3
|
|||
|
|||
Ugh, I knew that. Got too dialed in on the array and using options withe a text input to remember the basics.
Thanks so much |
Благодарность от: | ||
CAG CheechDogg |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|