PDA

View Full Version : Turning a feature on/off with radio button


DJ29Joesph
02-13-2010, 12:35 AM
I have a feature I want users to be able to choose whether they want music played or not. I created a Cutom User profile field and made it a on or off radio button and I used this code:


<vb:if condition="$post['field20'] == 'on'">
Code......
</vb:if>


However it still plays even if the user has "off" chosen. What did I do wrong?:confused:

Lynne
02-13-2010, 03:33 AM
Since you are probably aiming this towards the person viewing the page (and not who's post you are looking at), you probably want to use $bbuserinfo['filed20'] instead

DJ29Joesph
02-14-2010, 04:52 AM
ah I didn't know $bbuserinfo was included with vB4.0. Thanks Lynee, your always a great help :)