<?xml version="1.0" encoding="UTF-8"?>
<!--

  $Author: richard $

  $Revision: 1.8 $

  $Log: 2,v $
  Revision 1.8  2002/04/25 14:11:15  richard
  set as manual

  Revision 1.7  2002/04/23 10:06:28  richard
  missing "

  Revision 1.6  2002/04/19 15:07:19  richard
  autofailed and extra /int the wml:card

  Revision 1.5  2002/03/13 11:51:54  richard
  writing

  Revision 1.4  2002/02/28 15:55:30  richard
  rewrite tests

  Revision 1.3  2001/10/30 16:22:31  gb
  Modified all the test files in the wml2 directory such that it puts the <?xml?> declaration back at the top of the file, before the comment.

  Revision 1.2  2001/10/08 21:56:16  gb
  Added the standard header of Author, Revision and Log at the top of each template file.


-->
<test id="wml2/uabehaviour/formprocessing/forminitialisation/2" class="A" scope="wml2" 
	testtype="application" type="manual" source="wml2#5.4.2" device="both">
  <assertion>When displaying a card with form controls, the user agent must 
  process the controls in the order in which they appear in the card.
  </assertion>
  <specnote>Create a card that contains the following markup:-
&lt;pre>
&amp;nbsp;&amp;nbsp;&amp;lt;form action="..."&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;input name="x" value="1" /&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;input name="x" value="2" /&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;/form&gt;
&lt;/pre>
Make sure that the user agent displays the value of "2" for the variable "x" 
named by the WML:GETVAR element.
</specnote>
  <results>
    <result ci="true">
      <name>num</name>
      <value>2</value>
    </result>
  </results>
  <method> 
		<![CDATA[
			<wml:card id="main" title="main" newcontext="true">
				<p>Submit the value</p>
  			<form action="#card2">
   				<fieldset>
      			<input wml:name="num" value="1" />
  				</fieldset>
   				<fieldset>
      			<input wml:name="num" value="2" />
  				</fieldset>
  				<fieldset>
      			<input type="submit" value="submit" />
  				</fieldset>
      	</form>
      	<p>Failed if card2 can not be accessed by the submission</p>
				[[auto_failed]]
			</wml:card>
			<wml:card id="card2">
				<wml:onevent type="enterforward">
					<wml:go href="[[resulturl]]">
						<wml:postfield name="lang" value="$(num)" />
						[[sessionvars]]
					</wml:go>
				</wml:onevent>
				[[auto_failed]]
			</wml:card>	
		]]>
  </method>
</test>
