We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17460
    • 14 Posts
    Hi Forum

    I created a template-variable and i’m trying to manipulate the options and it’s default value.
    Those options and default values should be generated in a php script. I’m using the @EVAL -binding to implement that.
    Now i have a strange problem. I can’t create the default-value of a TV with the @EVAL -binding.

    For a simple test i tried to set this code.
    defaultValue=
    @EVAL return "2"


    This code doesn’t select the correct option though the creation of the available options seems to work:
    options=
    @EVAL return "red==1||green==2"


    Am I doint something wrong? Or does the default-value not support @Bindings?

    PS: I’m using modx 1.0.2



    ////////edit:
    Because I got no solution until now, i created a screenshot with what I am trying to do. May this helps you to better understand my problem (even if my interface language is german).


    can anyone reproduce my problem??? I’m stuck here undecided
      • 12736
      • 259 Posts
      I have the same problem! And I think this is a bug. eAgle, tell me, please, did you solve this problem?
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        I don’t know about using a snippet in the options values, but in the default value you can just put the snippet tags: [[Langfinder]]
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org