How are the different checkboxes set to on or off by default?
I'd like to leave this as an option, but have it off by default:
<td><label for="signup_mobile_opt_in">{% check_box "mobile_opt_in", class:"checkbox" %} Send me text message updates</label></td>
In other places, the {% checkbox %} setting is off, but with as near as I can tell, identical code in the template.
What am I missing?
We define whether a checkbox is checked or not based on best practices, but it's easy to change by editing the template of the page. In this case, you would remove:
{% check_box "mobile_opt_in", class:"checkbox" %}
And replace it with:
<input class="checkbox" id="signup_mobile_opt_in" name="signup[mobile_opt_in]" type="checkbox" value="1" checked />
Update: I have updated this code to add the term "checked" to the end of the <input> element to reflect updated web standards.
Showing 11 reactions
Sign in with
Hopefully it works this time, trying to escape the HTML:
Certified Architect
Certified Expert
Certified Developer