<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN"
			"http://www.phone.com/dtd/wml11.dtd" >
<!-- Input Form -->

<wml>
  <card title="Form">
    <p mode="nowrap">
      Edit Account
      <select iname="index">
        <option>
          <onevent type="onpick">
            <spawn href="#EditString">
              <setvar name="string" value="$(firstname)"/>
              <setvar name="title" value="First Name"/>
              <setvar name="index" value="2"/>
              <receive name="firstname"/>
              <receive name="index"/>
              <catch/>
            </spawn>
          </onevent>
          First: [$(firstname)]
        </option>
        <option>
          <onevent type="onpick">
            <spawn href="#EditString">
              <setvar name="string" value="$(lastname)"/>
              <setvar name="title" value="Last Name"/>
              <setvar name="index" value="3"/>
              <receive name="lastname"/>
              <receive name="index"/>
              <catch/>
            </spawn>
          </onevent>
          Last: [$(lastname)]
        </option>
        <option>
          <onevent type="onpick">
            <spawn href="#EditString">
              <setvar name="string" value="$(street)"/>
              <setvar name="title" value="Street Address"/>
              <setvar name="index" value="4"/>
              <receive name="street"/>
              <receive name="index"/>
              <catch/>
            </spawn>
          </onevent>
          Street: [$(street)]
        </option>
        <option>
          <onevent type="onpick">
            <spawn href="#EditZip">
              <setvar name="string" value="$(zip)"/>
              <setvar name="index" value="1"/>
              <receive name="zip"/>
              <receive name="index"/>
              <catch/>
            </spawn>
          </onevent>
          Zip: [$(zip)]
        </option>
      </select>
    </p>
  </card>

  <card id="EditString" title="Edit">
    <do type="accept">
      <exit>
        <send value="$(string)"/>
        <send value="$(index)"/>
      </exit>
    </do>
    <p>
      $(title): 
      <input name="string" value="$(string)"/>
    </p>
  </card>

  <card id="EditZip" title="Edit">
    <do type="accept">
      <exit>
        <send value="$(string)"/>
        <send value="$(index)"/>
      </exit>
    </do>
    <p>
      Zip Code:
      <input name="string" value="$(string)" format="NNNNN"/>
    </p>
  </card>
</wml>
