Web | This Site

WML Home
WML Tags Reference
Selected Reading
© 2011 TutorialsPoint.COM

| Home |  | References |  | Discussion Forums |  | About TP

# WML <postfield> Tag

The <postfield> tag is used to post variables values to the server.

# Attributes:

This element supports the following attributes:

Attribute | Value | Description
--- | --- | ---
name | string | Sets the name of the variable
value | string | Sets the value of the variable
class | class data | Sets a class name for the element.
id | element ID | A unique ID for the element.

# Example:

Following example shows how to submit three fields name, age and sex to the server.

    <?xml version="1.0"?>

    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
    "http://www.wapforum.org/DTD/wml12.dtd">

    <wml>

    <card id="card1" title="WML Form">
    <p>
       Name: <input name="name" size="12"/>

       Sex : <select name="sex">
          <option value="male">Male</option>
          <option value="female">Female</option>
          </select>

       Age :  <input name="age" size="12" format="*N"/>
       <anchor>
          <go method="get" href="process.php">
              <postfield name="name" value="$(name)"/>
              <postfield name="age" value="$(age)"/>
              <postfield name="sex" value="$(sex)"/>
          </go>
          Submit Data
        </anchor>
    </p>
    </card>

    </wml>

When you download above code on your WAP device, it will provide you option to enter three fields name, age and sex and one link Submit Data. You will enter three fields and then finally you will select Submit Data link to send entered data to the server.

Advertisement

Online Image Processing

Indian Baby Names