Source

django-formrenderingtools / demo / demoproject / demoapp / templates / demoapp / includes / fieldsets_builtin.html

Full commit
<form>
  {{ form.non_field_errors }}

  <fieldset>
    <legend>Message content</legend>
    
    {% with form.subject as field and "id_subject" as field_id %}
      <div class="fieldWrapper">
        {{ field.errors }}
        <label for="{{ field_id }}">{{ field.label }}</label>
        {{ field }}
        <span class="helptext">{{ field.help_text }}</span>
      </div>
    {% endwith %}

    {% with form.message as field and "id_message" as field_id %}
      <div class="fieldWrapper">
        {{ field.errors }}
        <label for="{{ field_id }}">{{ field.label }}</label>
        {{ field }}
        <span class="helptext">{{ field.help_text }}</span>
      </div>
    {% endwith %}
  </fieldset>

  <fieldset>
    <legend>Sender options</legend>
    
    {% with form.sender_email as field and "id_sender_email" as field_id %}
      <div class="fieldWrapper">
        {{ field.errors }}
        <label for="{{ field_id }}">{{ field.label }}</label>
        {{ field }}
        <span class="helptext">{{ field.help_text }}</span>
      </div>
    {% endwith %}

    {% with form.sender_nickname as field and "id_sender_nickname" as field_id %}
      <div class="fieldWrapper">
        {{ field.errors }}
        <label for="{{ field_id }}">{{ field.label }}</label>
        {{ field }}
        <span class="helptext">{{ field.help_text }}</span>
      </div>
    {% endwith %}

    {% with form.cc_myself as field and "id_cc_myself" as field_id %}
      <div class="fieldWrapper">
        {{ field.errors }}
        <label for="{{ field_id }}">{{ field.label }}</label>
        {{ field }}
        <span class="helptext">{{ field.help_text }}</span>
      </div>
    {% endwith %}
  </fieldset>
  
  <input type="submit">
</form>