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

Disable option "B" if option "A" is set to a certain value

Discussion in 'XenForo Development Discussions' started by farang, Mar 9, 2016.

  1. farang

    farang Well-Known Member


    I wonder if it would be possible to disable (fade out) a subsequent option in an option group if another option is set to a specific value. For example

    If I check the option "I don't eat fish" I would like another option (with it's own option ID) that asks me what kind of fish I like to be greyed out. I'm not good in explaining, I know but I hope my question is understandable. Thanks!
  2. katsulynx

    katsulynx Well-Known Member

    I'm not aware of a default functionality like that (which does not necessarily mean there is none!), so I'd spontaneously come up with the idea of using a named template as option type and therein include a jquery-script that does what you want.
  3. Chris D

    Chris D XenForo Developer Staff Member

    Have a look at Admin CP > Options > User Options

    When "Enable Trophies" is disabled, it disables the radio button to prevent use of trophy points as the basis for the user title ladder.

    This isn't exactly what you want, but there may be some code there that could be useful.
    SneakyDave likes this.

Share This Page