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

XF 1.1 Showstopper.... custom field needs a value by default

Discussion in 'XenForo Questions and Support' started by Rob, Mar 22, 2012.

  1. Rob

    Rob Well-Known Member


    Im due to relaunch on xenforo monday (finally)...

    I have a custom field (radio buttons) and i need to preselect one as default. It is critical that I be able to do this with the field in question. I have a few custom fields and for the most part it doesnt matter about defaults but this one field is crucial.

    How on earth can I bodge this?

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. high1976

    high1976 Active Member

    depends on where you use it...in a template you can define a default behavior and change it only if user selected something else
    <xen:if is="{$visitor.customFields.messagebackground} == 'white'">
      <div class="messageInfo primaryContentwhite">
    <xen:else />
    <div class="messageInfo primaryContent">
  4. Rob

    Rob Well-Known Member

    I know how to get to the data in templates. My point is, I need a pre-selected default on register. The default atm is no selection... I need one selected.

    Jake has helped anyway, thats exactly what i need - just cant get it working quite yet but will keep trying.
  5. Gabriel Pinho

    Gabriel Pinho Member

Share This Page