FAQ
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

Search Discussions

  • MRAB at Feb 28, 2009 at 11:42 pm

    Muddy Coder wrote:
    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.
  • Lie Ryan at Mar 1, 2009 at 1:26 am

    MRAB wrote:
    Muddy Coder wrote:
    Hi Folks,

    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.
    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.
  • Steve Holden at Mar 1, 2009 at 1:33 pm

    MRAB wrote:
    Muddy Coder wrote:
    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.
    Or, if it is, it's a bug in the web page, not ClientForm!

    regards
    Steve
    --
    Steve Holden +1 571 484 6266 +1 800 494 3119
    Holden Web LLC http://www.holdenweb.com/
  • Gabriel Genellina at Feb 28, 2009 at 11:53 pm
    En Sat, 28 Feb 2009 21:01:56 -0200, Muddy Coder <cosmo_general at yahoo.com>
    escribi?:
    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"?
    See http://www.iana.org/assignments/media-types/image/

    --
    Gabriel Genellina

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedFeb 28, '09 at 11:01p
activeMar 1, '09 at 1:33p
posts5
users5
websitepython.org

People

Translate

site design / logo © 2022 Grokbase