Hello,

I am wondering how I can restrict the available choices in the dropdown
box of a form.

I got a table defined like this. This table links auth_users to customers.

db.define_table('t_customer_contact',
                Field('f_customer', db.t_customer, label=T("customer")),
                Field('f_contact', db.auth_user, label=T("contact")),
                auth.signature,
                format='%(f_contact)s',
                migrate=settings.migrate)


Now I got the form, to add auth_users/contacts to the customer.

    form=SQLFORM.factory(db.t_customer_contact.f_contact)

I add the f_customer and do the insert manually.

But I only want to show auth_users in the dropdown box, that have a
certain auth_membership.
Is it possible or should I use the basic FORM?

Thanks a lot and kind regards
Cornelius


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to