Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #664 (closed defect: invalid)

Opened 13 years ago

Last modified 12 years ago

[PATCH] widgets.FieldSetForm - a form comprised entirely of fieldsets

Reported by: rob@… Owned by: anonymous
Priority: normal Milestone: 0.9a5
Component: TG Widgets Version:
Severity: normal Keywords: forms, widgets


For those who like forms' children to only be fieldsets and submit buttons:

class FieldSetForm?(Form):

""" A form comprised entirely of fieldsets, as all great forms are """ template = """ <form xmlns:py="http://purl.org/kid/ns#"

name="${name}" py:attrs="form_attrs"

<div py:for="field, value, options in hidden_fields"

py:replace="field.display(value, parent, options=options)"

/> <div py:for="field, value, options, error in fields">

<div py:replace="field.display(value, parent, options=options)" /> <span py:if="field.help_text" class="fieldhelp" py:content="field.help_text" />

</div> <p py:content="submit.display(submit_text, parent)" />

</form> """

Change History

comment:1 Changed 13 years ago by michele

  • Status changed from new to closed
  • Resolution set to invalid
  • Milestone set to 0.9a5

I can't see any fieldset being used here. :D

comment:2 Changed 13 years ago by alberto

What? Don't you?? Am I the only one who see's them?? :D

(Sorry, couldn't help it, happy monday mornings are not very common in my life ;)

comment:3 Changed 13 years ago by michele


comment:4 Changed 13 years ago by rob@…

  • Status changed from closed to reopened
  • Resolution invalid deleted

This is just supposed to be a reasonable container for fieldsets to be displayed in. There are no fieldsets in this template, they're provided by widgets.FieldSet?

comment:5 Changed 13 years ago by michele

Mmm, got it.

You may want to update the template to the 0.9a3 style (value_for, options_for), I'm still not convinced that such a layout is useful in TG core, at least not with this name.

I'm very open to a DivForm? template that uses some of the table-less layouts you can find around the net, I've links to them somewhere, one is from ALA (A List Apart) IIRC.

comment:6 Changed 13 years ago by godoy

  • Status changed from reopened to closed
  • Resolution set to invalid

Is this just a new kind of form? I believe that this could be packaged as a widget and released independently of TG core widgets...

From the final comment by Michele, I suppose this won't go in so I'm closing this as "invalid". If you create the "divform" he mentions, please open a new ticket (and remember that the template style has changed again ;-))

Note: See TracTickets for help on using tickets.