SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Sep 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Foreign characters in form field names

    Not sure if this is possible but I have a form whose field names depending upon the users language.
    ie the form has 3 input fields ( EMAIL, First_Name and Surname)
    If the users language the form would be:

    <input type="text" id="EMAIL" name="EMAIL" size="25" value = "" />
    <input type="text" id="First_Name" name="First_Name" size="25" value = "" />
    <input type="text" id="Surname" name="Surname" size="25" value = "" />

    If the users language is Spanish it would be:

    <input type="text" id="CORREO_ELECTRÓNICO" name="CORREO_ELECTRÓNICO" size="25" value = "" />
    <input type="text" id="Nombre" name="Nombre" size="25" value = "" />
    <input type="text" id="Apellidos" name="Apellidos" size="25" value = "" />

    Now my question is dose classic asp allow a form field name to be "name="CORREO_ELECTRÓNICO" because a request.form("CORREO_ELECTRÓNICO") dosent exist BUT request.form("CORREO_ELECTRONICO") dose!!!!

  2. #2
    SitePoint Enthusiast
    Join Date
    Jan 2009
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    By having different field names you will need different server side script or an extremely complex one. Moreover, the variable names can have only Ascii characters in them.

    Note that the field values can be any language.

  3. #3
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Why? Why have the form field names in another language when the user doesn't interface with the HTML itself, only what the browser renders for the HTML code?

    Seems to be somewhat a pointless exercise to be honest.
    Ian Anderson
    www.siteguru.co.uk

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,191
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    I agree. Unless you are using user input to generate the mark-up or something (is that even possible or wise?) there's no reason the attribute values need to be localized. I mean, you wouldn't try to change the mark-up from "input", "type", and "name" to Spanish so why bother trying to change the att vals. As said, the input values can accept localized characters so that should be adequate no?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •