Thanks Anthony.  If I put formname='membership' in the
form.process().accepted like this:

form.process(formname='membership').accepted:

Then does that refer to the _id arg set by
SQLFORM.factory(_id='membership')???

-Jim



On Wed, Mar 13, 2013 at 10:51 AM, Anthony <[email protected]> wrote:

> Not sure if this is the problem, but formname is an argument of
> .process(), not .__init__().
>
> Anthony
>
> On Wednesday, March 13, 2013 11:29:07 AM UTC-4, Jim S wrote:
>>
>> I have the following code:
>>
>> form = SQLFORM.factory(Field('auth_**group', 'integer', 
>> label='Groups',required
>> =True), formname='membership', submit_button='Add Membership')
>>
>> if form.process().accepted:
>>    user_update = form.vars
>>    if user_update['auth_group'] and user_update['auth_group'] != '0':
>>        db.auth_membership.insert(use**r_id=userId, group_id=user_update[
>> 'auth_**group'])
>>
>>    redirect('#')
>>
>>
>>
>>
>>
>> When I click on my add button it refreshes the page, but nothing else
>> happens.  It never gets past the form.process().accepted:
>>
>> I've been staring at this for an hour and can't see what I'm doing wrong.
>>  What am I not seeing?
>>
>> -Jim
>>
>>  --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/8p1jHtpxJNU/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to