Maybe you could try this ugly hack (non-tested) : define and use FieldGroup instead of FieldSet in your form.
class FieldGroup(turbogears.widgets.FieldSet):
template = """
<div xmlns:py="http://purl.org/kid/ns#" py:strip="True">
<span py:for="widget in widgets" py:strip="True">
<span py:if="widget.label and widget.labeltext"
py:replace="widget.label.insert(widget.labeltext)"/>
<span py:if="not widget.label or not widget.labeltext"
py:strip="True"> </span>
<span py:replace="widget.insert(getattr(self.widget_value, widget.name, None), input_values,
widget_error.get(widget.name, None))"/>
<span>
</div>
"""
sample_code = "widget = FieldGroup(widgets = [TextField()])"
Sorry I can't help you more, I'm working on another Widgets API (proposal)
which avoid those problems.
Jorge Godoy a écrit :
David Bernard <[EMAIL PROTECTED]> writes:I do a mistake, I thought the 'widgets' attribute need by Kid is for the main page, but not it seems to be need by the FieldSet kid template (as you wrote), sorry. Try to force the setting of the 'widgets' attribute of FieldSet, replace "widgets.FieldSet([" by "widgets.FieldSet(widgets=["It worked, but the output isn't what I needed. It even got uglier. :-(So, is there any way to put more widgets on the same row in a TableForm?
-- -------------------------------------------------------------- David "Dwayne" Bernard TurboHtmlPy creator
signature.asc
Description: OpenPGP digital signature

