Checking checkbox options in the renderer
I tried to ask a question http://www.yootheme.com/support/question/29146 and didn't get a response that worked. So, I'll perhaps try and reword it so it will be easier to respond to.
Basically, I need to find the value of a checkbox so it outputs an image. I have a checkbox element called 'services provided'. The natural output is just the text. I would preferrably like to be able to assign a different span to each checkbox, so I can apply a image sprite. If that isn't possible, I'd like to at least have it show an image for each of the services checked.
Here is a snippet from my original question: > "But, what I am wondering is if there is a way to display based on something that is checked as an option such as
<?php if ($this->checkPosition('option' -- option2checked)) : ?>
Obviously this code won't work, but do you see where I am going with this one?"
The answer back was: > "Hi, What you'd need to do is access element data and then run either an isset() or check to see if the data validates through each of your choices. Thanks."
Honestly, what does that answer mean? Nothing in the link provided me any answer. Some sample code would be nice, or something to at least help me out. Zoo obviously has the capability to render only what is checked and render it's string. But it spits them all out at once.
I even tried to go into the renderer element and see if I could get each output to go in it's own span, so I could just assign the image sprite that way. That didn't even work.
Again, to simplify, basically, I need to find the value of a checkbox so it outputs an image. Best method would be through assigning a class to a span so I can use an image sprite.