Skip to content

Instantly share code, notes, and snippets.

@taranjeet
Last active June 12, 2018 09:13
Show Gist options
  • Save taranjeet/aacdbb4dbcae29396e7692e1c6008b3c to your computer and use it in GitHub Desktop.
Save taranjeet/aacdbb4dbcae29396e7692e1c6008b3c to your computer and use it in GitHub Desktop.
Django Library: Normal Form html
<!-- create_normal.html :: part 3 -->
<form class="form-horizontal" method="POST" action="">
{% csrf_token %}
{{ formset.management_form }}
{% for form in formset %}
<div class="row form-row spacer">
<div class="col-2">
<label>{{form.name.label}}</label>
</div>
<div class="col-4">
<div class="input-group">
{{form.name}}
<div class="input-group-append">
<button class="btn btn-success add-form-row">+</button>
</div>
</div>
</div>
</div>
{% endfor %}
<div class="row spacer">
<div class="col-4 offset-2">
<button type="submit" class="btn btn-block btn-primary">Create</button>
</div>
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment