Hi all

I want to assign value at runtime in a HiddenField Turbogear 2.3.2


The form

class MovieForm(twf.Form):
    class child(twf.TableLayout):
        title = twf.TextField(validator=twc.Required)
        director = twf.TextField(value='Default Director', 
validator=twc.Required)
        director_verify = twf.TextField()
        genres = twf.CheckBoxList(options=['Action', 'Comedy', 'Romance', 
'Sci-fi'])
        channel=twf.HiddenField(value='putos')
    action = lurl('/save_movie')
    validator = FieldsMatch('director', 'director_verify')


The controller

@expose('pruebas.templates.demo')
    def demo(self, *args, **kw):
        myform = MovieForm
        myform.child.channel(value='google')
        return dict(page='demo', form=myform)

The error

myform.child.channel(value='google')
AttributeError: type object 'child_s' has no attribute 'channel'



Thanks for your help

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to