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

  $Author: richard $

  $Revision: 1.8 $

  $Log: 1,v $
  Revision 1.8  2002/04/20 16:30:46  richard
  one fieldset for the radio

  Revision 1.7  2002/04/20 08:32:32  richard
  yesno

  Revision 1.6  2002/04/19 15:17:17  richard
  autofailed

  Revision 1.5  2002/04/17 13:29:47  ajmc
  Corrected xml version

  Revision 1.4  2002/03/13 18:29:02  richard
  add form, rewrite test

  Revision 1.3  2001/10/30 16:22:36  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:18  gb
  Added the standard header of Author, Revision and Log at the top of each template file.


-->
<test id="wml2/uabehaviour/formprocessing/forminitialisation/radiobuttoncontrol/1" 
	class="A" scope="wml2" testtype="application" type="manual" 
	source="wml2#5.4.2.5" device="both">
  <assertion>When the WML:NAME attribute of the INPUT element is specified, 
  and the TYPE attribute is set to 'radio', the variable named by the 
  WML:NAME attribute must hold the value of the INPUT elements VALUE 
  attribute, for the radio button that has been pre-selected.
  </assertion>
  <specnote>Create a card(c1) that sets a variable
  (e.g. name="choice" value="car")and then navigates to a second card(c2) 
  with three INPUT elements with the TYPE attribute set to 'radio'. Set all 
  WML:NAME attributes to the same name(e.g. wml:name="choice"), and give each 
  VALUE attribute a seperate value. The card(c2) could also display the 
  variable to the user. Load the card, and make sure you are taken to the 
  second card that will show the pre-selected control and the variables value.
  </specnote>
  <results>
    <result ci="true">
      <name>submit</name>
      <value>yes</value>
    </result>
  </results>
  <method>
		<![CDATA[
			<wml:card id="main" title="main" newcontext="true">
  			<wml:onevent type="enterforward">
    			<wml:go href="#card2">
      			<wml:setvar name="choice" value="car" />
    			</wml:go>
  			</wml:onevent>
				[[auto_failed]]
			</wml:card>
			<wml:card id="card2" title="card2">
				<form action="#card3">
     			<fieldset>
  					<p>Plane</p>
    				<input type="radio" wml:name="choice" value="plane" />
  					<p>Train</p>
    				<input type="radio" wml:name="choice" value="train" />
  					<p>Car</p>
    				<input type="radio" wml:name="choice" value="car" />
    			</fieldset>	
  				<fieldset>
   					<input type="submit" value="submit" />
   				</fieldset>
   			</form>
				<p>Is the initial value of the control &apos;Car&apos;?
					<br/>
  					[[yesno]]
  				</p>
			</wml:card>
		]]>
  </method>
</test>
