[web2py] Re: Best practice for prepopulating regular form

2012-10-31 Thread Matt
You can do: otherSubject = request.post_vars.otherSubject or 'whatever' form = FORM( FIELDSET('Subject: ', INPUT(_name='subject')), FIELDSET('Other subject: ', INPUT(_name='otherSubject', value = otherSubject)), FIELDSET('Recipients: ', INPUT(_name='recips', )), FI

[web2py] Re: Best practice for prepopulating regular form

2012-10-31 Thread MichaelF
Jim, Thanks. I had already tried that, and it doesn't work for me. I wrote a little controller to test it: @auth.requires_login() def test_vars(): form = FORM( FIELDSET('Subject: ', INPUT(_name='subject')), FIELDSET('Other subject: ', INPUT(_name='otherSubject')), FIELDSE

[web2py] Re: Best practice for prepopulating regular form

2012-10-31 Thread Jim S
form.vars.fieldname = 'fieldvalue' -Jim On Wednesday, October 31, 2012 6:13:20 PM UTC-5, MichaelF wrote: > > I have a 'regular' form (i.e., FORM, not SQLFORM). I want to prepopulate > some of the fields, but I don't know the values to use for them when I > first create the form. What's the b