[twill] Why are hidden fields read-only?

Ram Rachum ram at rachum.com
Sun Mar 25 11:45:30 PDT 2012


Thanks Howard! That solves my problem.

Ram.

On Sun, Mar 25, 2012 at 8:06 PM, Howard B. Golden <howard_b_golden at yahoo.com
> wrote:

> Ram,
>
> From the mechanize FAQ:
>
> How do I change INPUT TYPE=HIDDEN field values (for example, to emulate
> the effect of JavaScript code)?
> As with any control, set the control’s readonly attribute false.
>
> form.find_control("foo").readonly = False # allow changing .value of control foo
> form.set_all_readonly(False) # allow changing the .value of all controls
>
> HTH,
>
> Howard
>
>   ------------------------------
> *From:* Ram Rachum <ram at rachum.com>
> *To:* twill at lists.idyll.org
> *Sent:* Sunday, March 25, 2012 10:43 AM
> *Subject:* [twill] Why are hidden fields read-only?
>
> Hello,
>
> I'm using Twill and I tried to fill in a form which has a hidden field.
>
> Twill doesn't let me fill in the hidden field, saying it's read-only:
>
>     AttributeError: control 'user' is readonly
>
> Why is this? What's the problem with writing to a hidden field?
>
>
> Thanks for your help,
> Ram Rachum.
>
> _______________________________________________
> twill mailing list
> twill at lists.idyll.org
> http://lists.idyll.org/listinfo/twill
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/twill/attachments/20120325/47de6092/attachment.htm>


More information about the twill mailing list