Thank You Massimo.

I solved it using the following:

form = SQLFORM(db.table,  _id='*name_for_form*')

It works.

Thank again.
Cheers.


El lunes, 23 de septiembre de 2013 14:43:29 UTC-5, Massimo Di Pierro 
escribió:
>
> Yes. The problem is that form.custom.begin is create when the form object 
> is defined. Since it is a string it is not updated when you change a form 
> attribute. If this is really an issue for you open a ticket. The behavior 
> can be changed.
>
> On Monday, 23 September 2013 10:00:37 UTC-5, Ángel Gabriel Morales Acosta 
> wrote:
>>
>> Hello.
>>
>> For example.
>>
>> *<<in Controller>>*
>> def view():
>>     ....
>>     form = SQLFORM(db.table)
>>     form['_id']='*name_for_form*'
>>     ....
>>     return dict(form=form)
>>
>> *<<in View>>*
>> ....
>> {{=form}}
>> ....
>> *<<in HTML>> *      ---> Yes. OK. Print name id for form
>> ....
>> <form action="#" enctype="multipart/form-data" id="*name_for_form*" 
>> method="post">  
>> ....
>>
>> But if i use to the next in view:
>> *<<in View>>*
>> ....
>> {{=form.custom.begin}}
>> ....
>>     {{ for fieldname in form.table.fields: }} ....
>> ....
>> {{=form.custom.end}}
>> ....
>> *<<in HTML>*    ---> *In this case no print name id for the form*  :(
>> <form action="#" enctype="multipart/form-data"  method="post">  
>>
>> I need name ID form the form using form.custom.begin
>>
>> What is wrong?
>> any idea?
>> Thanks
>>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to