This question may be related to a resolved thread.
Hi there,
I just had to realize that I’m still struggling with checkboxes in Safecracker edit-forms, although I thought I fixed the original problem with conditionals like this:
<label class="checkbox">
{if my_field == 'on'}
<input class="input checkbox" type="checkbox" name="my_field" value="" {my_field} checked> On!
{if:else}
<input class="input checkbox" type="checkbox" name="my_field" value="on" {my_field}> On?
{/if}
</label>Now, this works well and all, but I’m ending up with a serious amount of if-statements, especially when using checkboxes with multiple options.
So, how can I do it the right way?
And btw, sorry Shane for confusing you with Dan in the original thread! 😉