Hi,

I have a from with a single select field. At the first visit of the page the options are in the select field. Other times they are there or not. E.g. pressing the submit button with an empty textfield in the form, the form is returned, but without selectable values in the select (so the select is there, but no options).

Any idea? Thanks!
Tamas

(not the complete code)
-----------------------------
class BoxForm(TableForm):

    type_options = enumerate(('LN','-80C','-20C', '4C', 'RT'))

    fields = [
SingleSelectField('type', options=type_options, default='LN', validator=NotEmpty),
        TextField('name', validator=NotEmpty),
        ...
        ]
create_box_form = BoxForm("create_box_form", action="newbox_post")
-----------------------------
(root.py)
    @expose('tgmystorage.templates.newbox')
    @authenticate
    def newbox(self, **kw):
        tmpl_context.create_box_form = create_box_form
        return dict()

    #**************************
    @authenticate
    @validate(create_box_form, error_handler=newbox)
    @expose()
    def newbox_post(self, **kw):
        redirect(url("/browse"))

--
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en.

Reply via email to