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

Custome User Fields

Discussion in 'XenForo Questions and Support' started by Ablac, Jan 27, 2012.

  1. Ablac

    Ablac Active Member

    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
  2. Ablac

    Ablac Active Member

    :'( Im assuming by the lack of responses there no way to accomplish this task yet :(
  3. steel_curtain

    steel_curtain Well-Known Member

    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.
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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:

    <xen:if is="!{$visitor.customFields.radiofield} OR {$visitor.customFields.radiofield} == 'no'">
    Michael likes this.
  5. Ablac

    Ablac Active Member

    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.

    Thats a Valid idea :) But where would I modify/put the above code?
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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.

Share This Page