tags:

views:

55

answers:

1

i have two drop-downs let the first one called "A" and the second one called "B" and it is disabled by default if i select the second option from "A" drop-down the "B" drop-down is enabled and "B" drop-down is required.

so in my database i can't make it required, and in the following condition:

if FORM.accepts(insert_member_form,request.vars):

check the value of "B" drop-down:

if request.vars.membership_id == '':
   insert_member_form.errors.update({'membership_id':T('cant be empty')})
   return dict(form=insert_member_form)

so when i return form = insert_member_form it resubmit the form and waste all selected data.

How can i fix it?? or any other solutions to make what i want.

Thanks in advance

A: 

Please ask these questions to the web2py mailing list, here we cannot have a conversation.

mdipierro