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

  $Author: richard $

  $Revision: 1.6 $

  $Log: 1,v $
  Revision 1.6  2002/04/25 13:06:18  richard
  add an extra autofailed

  Revision 1.5  2002/04/19 15:04:40  richard
  autofailed

  Revision 1.4  2002/03/15 11:08:15  richard
  rewrite test

  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:15  gb
  Added the standard header of Author, Revision and Log at the top of each template file.


-->
<test id="wml2/uabehaviour/formprocessing/commitformdata/1" class="A" 
	scope="wml2" testtype="application" type="manual" source="wml2#5.4.4" 
	device="both">
  <assertion>When navigating away from a card containing a form, the user 
  agent must commit the current value of each form control to its form 
  control variable.
  </assertion>
  <specnote>Create a card with three INPUT elements with the TYPE attribute 
  set to 'radio'. Set all WML:NAME attributes to the same name, and give 
  each VALUE attribute a separate value. The card could also use an accept 
  button to go to a second card, which will display the variables value. 
  Load the card, check one of the buttons, and then go to the second card 
  and make sure that the variable holds that value of the chosen radio 
  buttons VALUE attribute.
  </specnote>
  <results>
    <result ci="true">
      <name>test</name>
      <value>train</value>
    </result>
  </results>
  <method>
		<![CDATA[
			<wml:card id="main" title="main" newcontext="true">
				<p>Please select the Train radio button 
					and then Submit the Form
				</p>
				<form action="#card2">
     			<fieldset>
  					<p>Plane</p>
    				<input type="radio" wml:name="choice" value="plane" />
    			</fieldset>	
    			<fieldset>
  					<p>Train</p>
    				<input type="radio" wml:name="choice" value="train" />
    			</fieldset>
    			<fieldset>
  					<p>Car</p>
    				<input type="radio" wml:name="choice" value="car" />
    			</fieldset>	
  				<fieldset>
   					<input type="submit" value="submit" />
   				</fieldset>
   			</form>
				[[auto_failed]]
			</wml:card>
			<wml:card id="card2" title="card2">
  			<wml:onevent type="enterforward">
    			<wml:go href="[[resulturl]]">
      			<wml:postfield name="test" value="$choice" />
						[[sessionvars]]
    			</wml:go>
  			</wml:onevent>
				[[auto_failed]]
			</wml:card>
		]]>
  </method>
</test>
