django-dynamic-forms comes with a basic template that just displays the form or a success page. You can customize these templates to your needs.
The following code shows the default template rendering a dynamic form.
{% load i18n %}
<h2>{{ name }}</h2>
<form method="post" action="{{ submit_url }}">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">{% trans "Submit" %}</button>
</form>
The DynamicFormView exposes three variables to the template context related to the form:
The following code shows the success template after a successful form submit.
{% load i18n %}
<h2>{% trans "Success" %}</h2>
<div>{% trans "Form submitted successfully" %}</div>
The DynamicTemplateView exposes three variables to the template context related to the form: