The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
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 | ||
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|