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
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
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
3 matches
Mail list logo