[twill] editing readonly fields on a form

Mark Devine mfmdevine at gmail.com
Wed Sep 9 02:07:38 PDT 2009


Hi
I was having a problem writing to hidden fields on a form (present due
to javascript) so I came across the thread:

http://lists.idyll.org/pipermail/twill/2007-August/000758.html

which advised that I set the readonly_controls_writeable config
option. So I set up the config so that readonly controls were writable
before calling the browser:

self.a=twill.commands
self.a.config("readonly_controls_writeable", 1)
self.b = self.a.get_browser()

I also checked before I called the code to set a readonly field that
the config item readonly_controls_writeable was set correctly:

twill.commands.config("readonly_controls_writeable")

key readonly_controls_writeable: value True

but when the code got to the readonly field to set I got the following:

...
  File "/home/me/python/site-packages/twill/other_packages/ClientForm.py",
line 2871, in __setitem__
    raise ValueError(str(e))
ValueError: control 'filterItem[0].parameterId' is readonly

I need to set readonly fields. They are the basis for the javascript
in the form. Can anone enlighten me?

A



More information about the twill mailing list