We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36760
    • 136 Posts
    I'm on Modx Revolution 2.5.0-pl and I've created a checkbox TV with the following settings:

    Input Option Values: index||noindex||follow||nofollow
    Default Values: index,follow
    Allow Blank: True

    Output Type: Delimiter
    Delimiter: ,

    This ends up in the following code in my templates:
    <meta name="robots" content="[[*metaRobots]]">

    Everything works as expected until I save one of my pages without checking any boxes. Instead of continuing to use the default value it uses nothing. I could use an Output Modifier to display my default options if the output is empty, but I was hoping to just have the "default" checkboxes checked to begin with. Is that possible? Searching Google and these forums didn't get me started on any ideas.

    Thanks for the help!

    This question has been answered by Jako. See the first response.

      • 13226
      • 953 Posts
      I am not a Revo expert but that sounds like a bug / problem

      The default values are there to be used permanently if specified, or should I say, until you have chosen something, whereby the chosen value should then be shown

      When you modify a page without changing the TV value, the default should always be used, if specified that is - nothing specified, nothing shows

      I am not familiar with the "Allow Blank" element - If I understnad propely, you can delete the default and that is allowed, so when you save the page, could it be that the default values are being deleted ?

      Try changing "allow blank" to "false" and give it a go - just a guess my end
      • discuss.answer
        The internal value of checkboxes (and other multi selectable template variables) is not comma separated but separated with the same syntax as in input option values. In your case use index||follow as default value and all should be fine.

          • 36760
          • 136 Posts
          Quote from: Jako at Jul 18, 2016, 06:03 AM
          The internal value of checkboxes (and other multi selectable template variables) is not comma separated but separated with the same syntax as in input option values. In your case use index||follow as default value and all should be fine.


          Thanks, this seems to have worked! I was certain I tried that already...

          Thank you everyone else for the other ideas, too.