<div class="govuk-form-group">
  {% if not form.between_bottom_of_range_expression.data %}
    {% set addBottomRangeDataButton %}
      {{ form.add_context(params={"html": "Reference data <span class='govuk-visually-hidden'>for minimum value</span>", "classes": "govuk-button--secondary govuk-!-margin-bottom-0", "value": "between_bottom_of_range_expression"}) }}
    {% endset %}
    {{ form.between_bottom_of_range(params={"classes": "govuk-input--width-10", "formGroup": {"afterInput": {"html": addBottomRangeDataButton } } }) }}
  {% else %}
    {% set removeBottomRangeDataButton %}
      {{ form.remove_context(params={"html": "Remove data <span class='govuk-visually-hidden'>reference for minimum value</span>", "classes": "govuk-button--secondary govuk-!-margin-bottom-0", "value": "between_bottom_of_range_expression"}) }}
    {% endset %}
    <div data-module="context-aware-editor" data-toolbar-enabled="false" data-i18n="{}" data-wrapper-classes="govuk-input--width-20">
      <div class="govuk-!-display-none" data-context nonce="{{ csp_nonce() }}">{{ g.context_keys_and_labels | tojson }}</div>
      {{ form.between_bottom_of_range_expression(params={"classes": "govuk-!-margin-bottom-0", "attributes": {"data-context-aware-editor-target": "", "readonly": ""}, "formGroup": {"classes": "app-context-aware--container", "afterInput": {"html": removeBottomRangeDataButton }}
      }) }}
    </div>
  {% endif %}

  {{ form.between_bottom_inclusive() }}

  {% if not form.between_top_of_range_expression.data %}
    {% set addTopRangeDataButton %}
      {{ form.add_context(params={"html": "Reference data <span class='govuk-visually-hidden'>for maximum value</span>", "classes": "govuk-button--secondary govuk-!-margin-bottom-0", "value": "between_top_of_range_expression"}) }}
    {% endset %}
    {{ form.between_top_of_range(params={"classes": "govuk-input--width-10", "formGroup": {"afterInput": {"html": addTopRangeDataButton } } }) }}
  {% else %}
    {% set removeTopRangeDataButton %}
      {{ form.remove_context(params={"html": "Remove data <span class='govuk-visually-hidden'>reference for maximum value</span>", "classes": "govuk-button--secondary govuk-!-margin-bottom-0", "value": "between_top_of_range_expression"}) }}
    {% endset %}
    <div data-module="context-aware-editor" data-toolbar-enabled="false" data-i18n="{}" data-wrapper-classes="govuk-input--width-20">
      <div class="govuk-!-display-none" data-context nonce="{{ csp_nonce() }}">{{ g.context_keys_and_labels | tojson }}</div>
      {{ form.between_top_of_range_expression(params={"classes": "govuk-!-margin-bottom-0", "attributes": {"data-context-aware-editor-target": "", "readonly": ""}, "formGroup": {"classes": "app-context-aware--container", "afterInput": {"html": removeTopRangeDataButton }}
      }) }}
    </div>
  {% endif %}

  {{ form.between_top_inclusive() }}
</div>
