Hi everyone,

I am trying to create a form which TextField shoud be populated with a 
default value.

My controller looks like:

class FileController(BaseController):
    class FileForm(twf.Form):
        class child(twf.TableLayout):
            ident = twf.TextField()
            input_file = twf.FileField(label='Input file: ')
        action = lurl('./process_file')

    @expose('amandmani.templates.form2', inherit=True)
    def new(self, ident, *args, **kw):
        value = {
                 'ident': ident,
        }
        return dict(page='new', form=self.FileForm, title=ident, 
value=value)

and is rendered by the following template snippet:

  <div id="form">
      ${form.display(value=dict(title='default title'))}
  </div>

but I can't get ident field to show value to be passed to function new().

The URL looks like http://localhost:8080/file/new/15

I can tell that 15 gets passed to new() because it shows in the title, but 
ident field remains empty.

Any help would be greatly appreciated.

Puska

-- 
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/groups/opt_out.

Reply via email to