Hi there,
I've googled around and can't find an obvious answer so I'm hoping someone can help.
I've created a check box tv and I want to output a certain piece of html within a chunk when it's checked.
How is this done?
Thanks in advance!
Which version of MODX you are using?
Thanks for that,
It doesn't seem to work though.
I'm using Rev 2.1.
Basically I've created a tv with a single checkbox that I can check to make a certain block a html appear on a page if I want it.
I can't find any info on how to actually use checkbox tv's once you've created them.
Any help?
OK, I've worked it out.
What you have to do is:
1. Create a chunk containing the html you want to output.
2. Create a tv, input type = checkbox
3. For the tv Input Option Values put yes==[[$chunkName]] (where 'yes' is what you want written next to the checkbox.
4. Now all you have to do is call the tv wherever you want it: [[*tvName]]
If the checkbox is checked, it will output the chunk, otherwise nothing.