[twill] Problem with multiple forms
titus at caltech.edu
Mon Mar 19 07:55:35 PDT 2007
On Mon, Mar 19, 2007 at 11:05:45AM -0000, Samuel Iseli - Vertec AG wrote:
-> I found out what caused the problem with submitting the form:
-> there were inputs on the page that were not part of a form (in HTML). it
-> seems that twill created a form 'on the fly' as the inputs are displayed as
-> part of a form by twill's showforms command. This seems to confuse the form
-> handling so that the last clicked form is not remembered for submit.
-> commenting out the 'lonely' inputs solved the problem.
-> I think it's not really good practice to have inputs without a form. but
-> most browsers seem to accept it and htmltidy didn't complain neither...
thanks for tracking this down (& sorry for me not getting to it
sooner...) The use of "global form elements" was indeed one of the big
changes in mechanize (the package twill is based on) in the last
release. It turns out that it is entirely legitimate to have such
form elements in the main body.
The problem here is my own stupidity in patching mechanize's
'select_form' function to deal with a mechanize bug. Let's just say
that I made a 1st year programming mistake & leave it at that, shall we?
The latest twill code is available at
could people try it out & let me know if it fixes this form problem for
More information about the twill