Thanks Justin that's exactly what I was looking for.

Paddy

On Aug 20, 2:34 pm, "Justin Fagnani" <[EMAIL PROTECTED]> wrote:
> Paddy,
>
> You can use formset.initial_forms and formset.extra_forms instead of
> formset.forms
>
> -Justin
>
> On Tue, Aug 19, 2008 at 6:18 PM, Paddy Joy <[EMAIL PROTECTED]> wrote:
>
> > I would like to determine which forms within a formset are new forms
> > and which forms are existing forms.
>
> > For example if I create a formset with extra=3, I would like to put
> > the 3 extra forms into a seperate fieldset for readability reasons.
>
> > I have tried building some logic into the template but I'm having no
> > luck so far.
>
> > Can anyone help out?
>
> > <form method="POST" action="">
> >    <fieldset>
> >        <legend>Edit Domain</legend>
> >        {{ form.as_table }}
> >    </fieldset>
>
> >    {{ dns_formset.management_form }}
> >    <fieldset>
> >        <legend>Edit DNS Records</legend>
> >        {% for form in dns_formset.forms %}
> >                {% ifnotequal form.required_data_field.value '' %}
> >                        {{ form.as_table }}
> >                {% endifnotequal %}
> >        {% endfor %}
> >    </fieldset>
> >    <fieldset>
> >        <legend>Create DNS Records</legend>
> >        {% for form in dns_formset.forms %}
> >                {% ifequal form.required_data_field.value '' %}
> >                        {{ form.as_table }}
> >                {% endifequal %}
> >        {% endfor %}
> >    </fieldset>
> >    <input type="submit" value="Submit" />
> > </form>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to