To get rid of the colon in the forms I do the following:
form=SQLFORM(...)
for label in form.elements('label'):
label.components = label.components[-2]
This works for:
form=auth()
form.SQLFORM(...)
form=SQLFORM.factory(...)
However, in case of form=crud.update(...) I get the following error
ticket
Traceback (most recent call last):
File "/Library/Python/2.5/site-packages/web2py_1.87.3/gluon/
restricted.py", line 188, in restricted
exec ccode in environment
File "/Library/Python/2.5/site-packages/web2py_1.87.3/applications/
init/controllers/admincms.py", line 524, in <module>
File "/Library/Python/2.5/site-packages/web2py_1.87.3/gluon/
globals.py", line 96, in <lambda>
self._caller = lambda f: f()
File "/Library/Python/2.5/site-packages/web2py_1.87.3/gluon/
tools.py", line 2298, in f
return action(*a, **b)
File "/Library/Python/2.5/site-packages/web2py_1.87.3/applications/
init/controllers/admincms.py", line 380, in logo
label.components = label.components[-2]
IndexError: list index out of range
This error somehow has something to do with deletable being set to
True or False i.e this works:
form=crud.update(table=db.tagline,...,deletable=False)
for label in form.elements('label'):
label.components = label.components[-2]
... and this doesn't work:
form=crud.update(table=db.tagline,...,deletable=True)
for label in form.elements('label'):
label.components = label.components[-2]
Is there a solutions for this problem?
Kind regards,
Annet