- My Channel has radios and checkboxes. How to I loop through the options so that I can display each item as a radio/checkbox option in the mark up? The example I found doesn't make much sense to me:
{if radio} {options} <label class="checkbox">{option_value} <input type="radio" id="{field_name}" name="{field_name}" value="{option_value}"{checked}> </label> {/options} {/if}
- SafeCracker outputs a bunch of hidden fields in a
div.hiddenFields
. It should be in a<fieldset>
if it's going to pass validation. Is there a way to make them appear in a fieldset? - I'd like to set a class in the
<form>
tag produced by SafeCracker. Is there a way to do that? - How do I display the field value for text, textarea, radio, checkbox, etc? I'd like to display them when the form loads if the values previously exist. And when user submits a form with bad values, I'd like to display the submitted values when the error page is displayed.
EDIT 1: My first question is solved, I think:
{options:gender}
<label for="{option_value}">
<input type="radio" name="gender" value="{option_value}" id="{option_value}">
{option_value}
</label>
{/options:gender}