I am working with a template where items are filtered by their checkbox values. The each item can have multiple checkbox values, and when they are selected the checkbox values are separated with a comma.
example: The template looks like this:
<div class="{checkbox_values}"></div>
When multiple checkboxes are selected it looks like this:
<div class="value1, value2, value3></div>
I am using the isotope (http://isotope.metafizzy.co/) plugin to filter and sort my website values but isotope won't read the values with a comma after them. In the example above the only filter my filter function would read would be value3 (because it doesn't have a comma after it). Is there a way to customize the checkbox separator from a comma to a space? Or is there a different channel field that is better suited for something like this?
edit: This problem has been solved by adding some PHP to the replace the commas in the string of the class.
example:
<div class="<?php echo str_replace(",","","{checkbox_values}") ?>"></div>