I want to know how I can get content of a certain element by a dynamic id/name in embeded python codes in web2py view page?
Basically I want something like:
{{for task in tasks:}}
...
{{=TEXTAREA(task['remark'], _name='remark'+str(task['id']), _id='remark'+str(task['id']), _rows=2)}}
{{=A('OK', _class='button', _href=URL('update_remark', vars=dict(task_id=task['id'], new_remark=['remark'+str(task['id'])])))}}
What I want the ['remark'+str(task['id'])] do is to get the content automatically but obviously it won't work, I'm wondering how I can achieve this? Is there any API that can help?
Thanks in advance!
I used a Form to achieve this. Working quite well.
How to get content of element in embeded python codes in web2py view