We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5811
    • 1,717 Posts
    I have set up a tv named asversion (see the screen capture) and I would like to init this tv with @INHERIT.
    It doesn’t work and can’t find where is my error >:( Any help ?

    I have initialised the container with the version 1.9.0

    TV asversion:



    Container tv initialisation:

      • 5811
      • 1,717 Posts
      Any ideas regarding this request ?
        • 4172
        • 5,888 Posts
        seems the value in ProcessTVCommand has never the default-value, but the field-elements in case of radio-buttons and checkboxes:

        case "option": // handles radio buttons
        				$index_list = ParseIntputOptions(ProcessTVCommand($field_elements, $field_name));


        function ProcessTVCommand($value, $name = '', $docid = '') {
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 33337
          • 3,975 Posts
          IIRC, u can use @INHERIT value .eg @INHERIT 190

          Hope it help.
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 5811
            • 1,717 Posts
            u can use @INHERIT value .eg @INHERIT 190
            No, my objective is to use the radio button at the level of the container and then propagate the value selected as initial value for the children documents.

            But I would like do the same thing, with checkboxes. Define a tv with an entry type as checkboxe and then get as initial value the choices done (by selecting one or several checkbowes) in the parent document.
            For instance, below by selecting "production" at the parent level, I expect that children documents are initialized with "production" as ticked boxes:





            But this is not the case. In children document, I get the check boxes. But not initilized.



            Did i miss something or is it not possible with MODx1.0 ?
              • 3749
              • 24,544 Posts
              It doesn’t work for me with either radio buttons or checkboxes. I would think that the child should inherit the value of the TV and this is a bug, but it doesn’t work in Revo either so maybe we’re both confused in the same way. wink
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 5811
                • 1,717 Posts
                Ok Thanks Bob. If I have enought time, I will try to undertsand where is the error.
                  • 25663 MODX Staff
                  • 12,272 Posts
                  It certainly should work. I think there’s some general UI clues that could be put in place to make it appear correctly. One thing I’ve done in the past as a workaround in this situation is to make the first/default value to be as follows:
                  inherit==@INHERIT


                  IIRC, that worked, but this bug deserves logging in JIRA to be sure.
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me