Here’s an example of how to ask about Religion or Belief:
Back to patterns
Ask users for... Religion or Belief
Example
HTML Snippet for Religion or Belief
<form>
<div class="form-group">
<label class="form-label" for="select-box">What is your religion?</label>
<select class="form-control" id="select-box" name="select-box">
<option value="" selected="selected" disabled="disabled">-- select one --</option>
<option value="Buddhist">Buddhist</option>
<option value="Christian">Christian</option>
<option value="Hindu">Hindu</option>
<option value="Jewish">Jewish</option>
<option value="Muslim">Muslim</option>
<option value="Sikh">Sikh</option>
<option value="No religion">No religion</option>
<option value="No belief">No belief</option>
<option value="Other">Other - please write below</option>
</select>
<div class="panel panel-border-narrow js-hidden" id="other-religion">
<label class="form-label" for="other-religion">Other </label>
<input class="form-control" name="other-religion" type="text" id="other-religion">
</div>
</div>
</form>
Error handling
- add a class of
form-group-error
to<div class="form-group">
- the error message
<span class="error-message">Choose an answer</span>
goes beneath the<legend>