Bug report: ClientForm

M

Muddy Coder

Hi Folks,

As directed, I got ClientForm and played with it. It is cool! However,
I also found a bug:

When it parses a form, if the VALUE of a field has not space, it works
very well. For example, if a dropdown list, there many options, such
as:

<option value=foo> ....

the value foo will be picked up for sure. But, if there is a space:

<option value=foo bar> .....

The *bar* will be missed out. I wish this bug can be fixed in near
future.

By the way, can somebody helps me on setting parameter of uploading a
file. In ClientForm, if I need to upload a text file, I can do it by:

form.add_file(..., "text/plain")

What about a picture file? What is the counterpart of 'text/plain"?
Thanks!

Muddy Coder
 
M

MRAB

Muddy said:
Hi Folks,

As directed, I got ClientForm and played with it. It is cool! However,
I also found a bug:

When it parses a form, if the VALUE of a field has not space, it works
very well. For example, if a dropdown list, there many options, such
as:

<option value=foo> ....

the value foo will be picked up for sure. But, if there is a space:

<option value=foo bar> .....
Values should be quoted, although you can omit the quotes if there
aren't any spaces in the string:

<option value="foo bar">

You can see examples at http://wwwsearch.sourceforge.net/ClientForm/

<input type="checkbox" name="control2" value="foo" id="cbe1">

As you can see, whitespace separates the name=value pairs.
The *bar* will be missed out. I wish this bug can be fixed in near
future.
It's not a bug.
 
L

Lie Ryan

MRAB said:
Values should be quoted, although you can omit the quotes if there
aren't any spaces in the string:

<option value="foo bar">

You can see examples at http://wwwsearch.sourceforge.net/ClientForm/

<input type="checkbox" name="control2" value="foo" id="cbe1">

As you can see, whitespace separates the name=value pairs.

It is also a good habit to have the quotes even when you don't use
spaces. Also, knowledge of xHTML in general should come in handy.
 
L

Lie Ryan

MRAB said:
Values should be quoted, although you can omit the quotes if there
aren't any spaces in the string:

<option value="foo bar">

You can see examples at http://wwwsearch.sourceforge.net/ClientForm/

<input type="checkbox" name="control2" value="foo" id="cbe1">

As you can see, whitespace separates the name=value pairs.

It is also a good habit to have the quotes even when you don't use
spaces. Also, knowledge of xHTML in general should come in handy.
 
S

Steve Holden

MRAB said:
Values should be quoted, although you can omit the quotes if there
aren't any spaces in the string:

<option value="foo bar">

You can see examples at http://wwwsearch.sourceforge.net/ClientForm/

<input type="checkbox" name="control2" value="foo" id="cbe1">

As you can see, whitespace separates the name=value pairs.

It's not a bug.

Or, if it is, it's a bug in the web page, not ClientForm!

regards
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top