No, it is not expected. The form.custom.widget items are created when the 
form is created. You have added the extra field after form creation. The 
.insert() method only inserts into the FORM object's DOM -- it does not 
update form.custom.widget.

Anthony

On Wednesday, February 13, 2013 11:33:43 AM UTC-5, Tito Garrido wrote:
>
> Hi Folks,
>
> I am trying to add a hidden field on a SQLFORM like this:
> *    form=SQLFORM(db.produto)
>     tags = TR(INPUT(_name='tags_hidden',value=True,_type='hidden'))
>     form[0].insert(-1,tags)*
>
> {{=form.custom.widget}} it does not show this extra field:
> <Storage {'estoque_min': <gluon.html.INPUT object at 0x32216d0>, 
> 'preco_custo': <gluon.html.INPUT object at 0x3221410>, 'tipo': 
> <gluon.html.SELECT object at 0x3221150>, 'tags': <gluon.html.SELECT object 
> at 0x3221dd0>, 'preco_venda': <gluon.html.INPUT object at 0x3221310>, 
> 'observacao': <gluon.html.TEXTAREA object at 0x3221d50>, 'estoque_max': 
> <gluon.html.INPUT object at 0x32217d0>, 'fornecedor': <gluon.html.SELECT 
> object at 0x3221b10>, 'unidade': <gluon.html.INPUT object at 0x3221510>, 
> 'codigo': <gluon.html.INPUT object at 0x32210d0>, 'ativo': 
> <gluon.html.INPUT object at 0x32215d0>, 'id': '', 'descricao': 
> <gluon.html.INPUT object at 0x31f3fd0>}> 
>
> Is it expected?
>
> Regards,
>
> Tito
>
> -- 
>
> Linux User #387870
> .........____
> .... _/_õ|__|
> ..º[ .-.___.-._| . . . .
> .__( o)__( o).:_______ 
>

-- 

--- 
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/groups/opt_out.


Reply via email to