if request.args(0):
empresa=row.empresa
foto=row['foto'] or None
#print foto
if row:
for field in row:
if field in db.trabalhador.fields:
#POPULATE FIELDS with record to edit
db.trabalhador[field].default=row[field]
form=SQLFORM.factory(db.trabalhador,db.t_docs,
submit_button="Gravar",
fields=['nome','bi','ncart','ncartval','rfid','apt_medica','apt_medicaval','val_formacao','f_doc'],
table_name='trabalhador',
upload=URL('download')
)
I see my record and upload fields with [file] link. The [file] link downloads my uploaded file.
My upload fields have required= true in db.py!!!
I do nothing and just press save
I get the error saying that i have to select a file to my upload field.
I´m stuck
Help please.....