MyBB Community Forums

Full Version: Template Conditionals
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I posted this over at Zinga Burga's site, but haven't gotten a response. Here is what I posted, maybe someone can point me in the right direction:


Quote:Hi,

I'm wondering if it's possible to make a conditional for a listbox.

What I'm trying to do is make it so when a user makes a selection, it will display certian HTML and other xthread fields.

So I made a contact form with a dropdown. If the person chooses "Contact Staff" then it will display only xthread fields that I made for staff.

If they choose "Submit Article" then it will not show any staff related xthread fields.

I was reading the forums and saw how it can be created, but I'm not sure what the values are for the drop down selection.

I saw something like:

Code:

<if $GLOBALS['threadfields']['contus_select'] == 'war' then>
This is a war zone
<elseif $GLOBALS['threadfields']['contus_select'] == 'safe' then>
this is a safe zone
</if>


I'm not sure where the 'war' and 'safe' values are coming from in this example.

Thanks for the help!