I believe your FORM needs a totalitems field or INPUT.  At least
that's what I experienced with SQLFORM.factory.

Needed a Field('totalitems', readable=False, writable=False) to match
if I was passing hidden=dict(totalitems='1').

I often choose SQLFORM or .factory for the ability to customize the
form in the view with CSS.

I have not tested this but perhaps adding an INPUT(_type='hidden',
_name='totalitems', _value='1') to your FORM may work.

Maybe look into SQLFORM and SQLFORM.factory 
http://web2py.com/book/default/chapter/07

Best of luck and I'm sure at least one genius on this list will have
the answer if I wasn't of any help, this community is almost
unbelievably helpful...almost :)

-David


On Sep 28, 10:14 pm, Joseph Jude <[email protected]> wrote:
> Hi,
> I define the below form in controller but the hidden field is not present in
> the view. Note that, field 'totalitems' is not in the db. Let me know how to
> add hidden fields to FORM.
>
> form = FORM(
> DIV(
> LABEL("Checklist Items:"),
> UL(
> SPAN(INPUT(_type="text", _name="citems"),
> IMG(_class="add", _src=URL('static', 'images/add.png')),
> IMG(_class="remove",_src=URL('static', 'images/delete.png'))),
> ),
> hidden=dict(totalitems='1')
> ))
> Thank you,
> Joseph

Reply via email to