• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Custome User Fields

Ablac

Active member
#1
I have a Radio button that Disables or Enables the Youtube video on the Homepage. Is there any way to make the radio button default to No

The current settings are Yes and No
Yes Disables the video
No Enables It.

I have another one for Some of the Advertising on my website but if we cant default it im losing out on some of the ad Revenue
 

steel_curtain

Well-known member
#3
Why do you need to have it defaulted to anything? Why don't you simply enable the video, and only turn off if they select the option to do so.
 

Jake Bunce

XenForo moderator
Staff member
#4
There is no default option for custom user fields. But you can simply adjust your condition to account for an empty value. This will be true for either "no" or empty:

Code:
<xen:if is="!{$visitor.customFields.radiofield} OR {$visitor.customFields.radiofield} == 'no'">

</xen:if>
 

Ablac

Active member
#5
Why do you need to have it defaulted to anything? Why don't you simply enable the video, and only turn off if they select the option to do so.
You cant, It defaults to Nothing which Disables the Video. I also tested with a Single Check Box it defaults to nothing as well which disables the videos also.

There is no default option for custom user fields. But you can simply adjust your condition to account for an empty value. This will be true for either "no" or empty:

Code:
<xen:if is="!{$visitor.customFields.radiofield} OR {$visitor.customFields.radiofield} == 'no'">
 
</xen:if>
Thats a Valid idea :) But where would I modify/put the above code?
 

Jake Bunce

XenForo moderator
Staff member
#6
I assumed your advertising and youtube video uses template conditionals. So you can modify those conditions in the templates (where ever you put them) using my example as a guide.