We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1331
    • 129 Posts
    Is it possible to make a TV field appear in Manager based on the true/false of another template variable ?

    For example:
    Checkbox that says "Featured?"

    Then, if true, shows another TV to input "Featured Title"
    • Quote from: abelafonte at Jul 18, 2011, 07:05 PM

      Is it possible to make a TV field appear in Manager based on the true/false of another template variable ?

      For example:
      Checkbox that says "Featured?"

      Then, if true, shows another TV to input "Featured Title"

      I would love to know the answer to this question as well this would come in very handy when creating extras or CMP.
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
        • 19302
        • 6 Posts
        Yep,

        Pretty sure it’s :

        true / false Template variable with Input Options :

        True==[[*tplVariable]]||False==Empty
        


        Then make a the ’tplVariable’ - make it as a text template variable to test it out on.

        Just include the call to the true/false template variable in your doc.
        • Michaelm I think what abelafonte is referring to is to have a TV option display on the manager side.

          For example I have a custom form that based on its selection it will display other TV that are associated with it in the custom form.

          Best example I can give is my NivoGallery Plugin this would come in handy if the user wants to use thumbnails if they choose yes then I can display a TV so the user can display the width and height of the thumbnail, etc.

          At least that is what I understood abelafonte was asking and if that’s not what hes asking then it’s what I want to know laugh

          Thanks.
            Benjamin Marte
            Interactive Media Developer
            Follow Me on Twitter | Visit my site | Learn MODX
            • 1331
            • 129 Posts
            @ben - Yes, that’s what I’d like to do. Conditionally show TVs based on TV selections in the manager.

            For example, when you create a TV and choose the input type, you get a spinner and then you get more fields that are relevant to the input type you selected.

            That’s what I want to be able to do with template variables on pages.
            • That would require writing a custom TV.
                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
                • 1331
                • 129 Posts
                @susan - the goal wouldn’t be to have just one feature appear after a selection. It would be to arbitrarily load another TV that a user has created.
                  • 4172
                  • 5,888 Posts
                  something like that is allready possible with MIGX and its multiple-forms feature.
                  For this you would create only one item and use the items fields, which are stored as a json-string for your output.

                  I’m about to create a MIGXone, where you have only one record, which you can edit, without the feature for adding multiple records.
                  But for now, just add only one item, and use that.
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                  • Quote from: Bruno17 at Jul 19, 2011, 05:43 AM

                    something like that is allready possible with MIGX and its multiple-forms feature.
                    For this you would create only one item and use the items fields, which are stored as a json-string for your output.

                    I’m about to create a MIGXone, where you have only one record, which you can edit, without the feature for adding multiple records.
                    But for now, just add only one item, and use that.

                    Is this is the front end or in the manager backend you are talking about?

                    Just trying to understand what you guys are suggesting because we are talking about the MODx manager backend.

                    Thanks.
                      Benjamin Marte
                      Interactive Media Developer
                      Follow Me on Twitter | Visit my site | Learn MODX
                    • Shame this never got solved.