<div class="gmail_quote">On Mon, May 3, 2010 at 9:18 AM, Norman Khine <span dir="ltr"><<a href="mailto:norman@khine.net">norman@khine.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
hello,<br>
how do i insert select form fields:<br>
<br>
here is my form:<br>
<br>
<a href="http://paste.lisp.org/display/98712" target="_blank">http://paste.lisp.org/display/98712</a><br>
<br>
this works for me<br>
<br>
fv("1", "firstName", "Test")<br>
fv("1", "lastName", "Tester")<br>
fv("1", "mail", "<a href="mailto:twill@domain.com">twill@domain.com</a>")<br>
fv("1", "confirmMail", "<a href="mailto:twill@domain.com">twill@domain.com</a>")<br>
<br>
submit()<br>
code("200")<br>
<br>
but when i add<br>
<br>
fv("1", "birthday[month]", 3)<br>
<br>
i get this error<br>
<br>
==> at <a href="http://aqoon.local/fr/registerUser" target="_blank">http://aqoon.local/fr/registerUser</a><br>
Traceback (most recent call last):<br>
File "test.py", line 82, in <module><br>
fv("1", "birthday[month]", 3)<br>
File "/Users/khinester/lib/python2.6/site-packages/twill-0.9-py2.6.egg/twill/commands.py",<br>
line 450, in formvalue<br>
set_form_control_value(control, value)<br>
File "/Users/khinester/lib/python2.6/site-packages/twill-0.9-py2.6.egg/twill/utils.py",<br>
line 172, in set_form_control_value<br>
if val.startswith('-'):<br>
AttributeError: 'int' object has no attribute 'startswith'<br>
<br>
thanks<br>
<br>
--<br>
¿noʎ uɐɔ uʍop ǝpısdn ǝʇıɹʍ uɐɔ ı - %>>> "".join( [<br>
{'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-83)%26) for c in<br>
",adym,*)&uzq^zqf" ] )<br>
<br></blockquote><div><br></div><div>Try making the value a string instead of an int:</div><div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">fv("1", "birthday[month]", '3')</span> </div>
</div>