{% set controlValue = attribute( form.record, control.name ).value %}
{% if controlValue is null %}
  {% set controlValue = attribute( form.record, control.name ) %}
{% endif %}
{% if controlValue is null %}
  {% set controlValue = form.defaults[control.name] %}
{% endif %}
{% if not controlDisabled %}
  <input type="hidden" name="{{ control.name }}" value="">
{% endif %}
<div class="form-check pt-1">
  <label class="form-check-label"><input class="form-check-input" type="radio" name="{{ control.name }}" id="{{ control.id }}_true" value="1" {{ controlValue? 'checked="checked"' : '' }} {% if controlDisabled %}disabled="disabled"{% endif %}> {{ form.parameters.language? control.metadata.optionSet.localizedOptions[1][form.parameters.language] : control.metadata.optionSet.options[1] }}</label>
</div>
<div class="form-check">
  <label class="form-check-label"><input class="form-check-input" type="radio" name="{{ control.name }}" id="{{ control.id }}_false" value="0" {{ controlValue? '' : 'checked="checked"' }} {% if controlDisabled %}disabled="disabled"{% endif %}> {{ form.parameters.language? control.metadata.optionSet.localizedOptions[0][form.parameters.language] : control.metadata.optionSet.options[0] }}</label>
</div>
