We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11858
    • 130 Posts
    How do I make a space delimited list using a TV and several checkboxes? I put the widget on to delimited list and put a "space" in there, but it defaults back to a comma. I have also put in " " in the delimiter field and while this produces spaces, when I call the TV [*tvname*] it doesn’t word wrap. It’s as if it’s treating the spaces as one long word.

    Is there another way to get space delimiters?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You will probably need to create your own TV output formatter http://wiki.modxcms.com/index.php/Adding_TV_Widgets_without_hacking_the_core
        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
        • 11858
        • 130 Posts
        I’m not sure if that will work, as I was using this for tagging and I think the values need to be stored with a real space instead of a fake &nsbp;.

        I could let the user enter their own tags, but to prevent user input errors I hope the checkbox approach would have worked as there is a limited set of tags to apply.

        Is there some other way I could get a space delimited list while restricting what the user can enter in?
          • 4172
          • 5,888 Posts
          I don’t know what you want to do with this space-delimited list.
          But, if it’s for outputting at frontend you can create a simple snippet, which converts commas to spaces.
          Or use a special unique placeholder as delimitter and replace them per plugin with spaces.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 4424
            • 42 Posts
            Working on this same problem right now.
            Made it in a way that the tags I check will go in my class which will be used in a jQuery script.
            Anyone knows a solution about this?
              • 22427
              • 793 Posts
              For a similar purpose - to choose CSS classes out of a list - I did this trick:
              Use an empty delimiter, but add to every name of the available options a leading space. So for example you have the options
              " one", " two", " three".
              In the case that the first two options are ticked you then get the result
              class=" one two"
              (where the leading blank is no harm).
              Maybe this idea could be helpful for your intention.
                • 4424
                • 42 Posts
                That doesn’t work cause it automatically gives the delimiter an ’ ..