If you want a dropdown from a reference table you have to put a *format at 
the end of the table*. So the dropdown show the formatted string and the 
value is the id (see example)


# Metodi per le analisi
db.define_table('metodi',
                Field('metodo',required=True),
                Field('id_unitaoperativa','reference unitaoperativa'),
                auth.signature,
               * format='%(metodo)s'*
                )

Il giorno domenica 9 agosto 2015 16:03:42 UTC+2, Alessio Varalta ha scritto:
>
> Hi, I have a table with external references my main table is person and 
> this has a field called scheda that is a external references to a table 
> scheda. If i create a sqlform the field scheda is a input string and the 
> user must insert the id of the external references for the form submit 
> accept. There is the possibility to create sqlform where the field scheda 
> is a list of schede and the user can choose one field that is translate 
> like a id, because is not natural for the user insert a id. Now i simulate 
> the operation with javascript but is not the solution
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to