Hello Cassio,

the Field constructor takes a name and a type. The type can be 
"list:reference malzemeler" (assuming you have a table malzemler). Also if 
you want the value to display something other than the id of a referenced 
record, you have to specify a record format for the referenced table. In 
your case for example db.define_table("malzemler", Field("name"), 
format="%(name)s").

If you want dropdowns in multi-lists you may want to consider using 
requires=IS_IN_DB(db, table.id, table.namefield, multiple=True) and use 
something like 
http://www.web2pyslices.com/slice/show/1395/jquery-multi-select-widget

Notice that all of this is very old. If you need a complex interface I 
would highly recommend using Vue.js and create your own UI and use py4web 
for backend api. That will work much better and be more customizable.

Massimo




On Tuesday, 5 October 2021 at 06:49:20 UTC-7 [email protected] wrote:

> hi everyone,
>
>  i have encountred a problem.
>
> as you see a field below, I want to add more rows to materials and I want 
> to add a dropdown box to each added row.
>
>  
>
> *Field('materials', 'list:string','reference malzemeler'),*
>
>
> these codes not run. Also I am using  SQLFORM.grid.
>
> i want to add rows (using + and - buttons). 'list:string' make this.
>
> also , i want to add drop down box  to these rows. 
>
> could you help please.
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/96231c5f-0899-4e7c-9dd7-3a08e48f060cn%40googlegroups.com.

Reply via email to