Login   Register  
PHP Classes
elePHPant
Icontem

File: quidich_form.xml

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of sameer shelavale  >  X2Form  >  quidich_form.xml  >  Download  
File: quidich_form.xml
Role: Auxiliary data
Content type: text/plain
Description: XML definition of a sample form for Example1.php
Class: X2Form
Show and validate HTML forms defined in XML files
Author: By
Last change:
Date: 1 year ago
Size: 3,578 bytes
 

Contents

Class file image Download
<?xml version="1.0" encoding="UTF-8"?>
<form action="example1_process.php" method="POST" enctype="multipart/form-data">
	<elements>
		<element type="label" name="LABEL1" value="Annual Quidich Tournament" ></element>
		<element type="text" name="FIRST_NAME" label="First Name" ></element>
		
		<element type="text" name="LAST_NAME" label="Last Name" ></element>
		
		<element type="text" name="QMAIL" label="Email" datatype="email" mandatory="true" ></element>
		
		<element type="dropdown" name="PROFESSION" label="Profession" mandatory="true" description="You need not apply if your profession is not listed here." >
			<options>
				<option value="" label="Select Profession" />
				<option value="seeker" label="Seeker" />
				<option value="keeper" label="Keeper" />
				<option value="blindsidebeater" label="Blind Side Beater" />
				<option value="opensidebeater" label="Open Side Beater" />
				<option value="centerchaser" label="Center Chaser" />
				<option value="outsidechaser" label="Outside Chaser" />
			</options>
		</element>
		<element type="checkbox" name="BROOMSTICKS" label="Select the broomsticks you have" direction="vertical" >
			<options>
				<option value="cleansweep" label="Cleansweep" />
				<option value="nimbus" label="Nimbus" />
				<option value="nimbus2000" label="Nimbus 2000" />
				<option value="nimbus2001" label="Nimbus 20001" />
				<option value="firebolt" label="Firebolt" />
			</options>
		</element>
		<element type="checkbox" name="RECEIVE_OFFERS" label="Receive special offers?">
			<options>
				<option value="yes" label="Yes"/>
			</options>
		</element>
		<element type="radio" name="MATCHES_PLAYED" label="How many matches have you played?" direction="vertical" >
			<options>
				<option value="0" label="0"/>
				<option value="1-5" label="1 to 5"/>
				<option value="6-10" label="6 to 10"/>
				<option value="11-25" label="11 to 25"/>
				<option value="26-100" label="26 to 100"/>
				<option value="100+" label="more than 100"/>
			</options>
		</element>
		
		<element type="dropdown" name="HOUSE" label="Which house you are from?" prompt="Select your house" >
			<options>
				<query valueField="HOUSE_ID" labelField="NAME"><![CDATA[
					SELECT * FROM houses;
				]]></query>
			</options>			
		</element>
		
		<element type="radio" name="IS_SEPARABLE" label="Is Separable?" >
			<options>
				<option value="True" label="Yes"/>
				<option value="False" label="No"/>
			</options>
		</element>
		
		<element type="textarea" name="INTRO" label="Write something about yourself" rows="5" cols="50">test string</element>
		
		<element type="file" name="PHOTO" label="Upload your photo" maxsizemb="2" allowextensions="jpg,png,jpeg" iffileexists="renamenew" uploaddirectory="uploaded_files/"></element>
		
		<element type="file" name="PORTFOLIO" description="Only in pdf format" label="Upload your portfolio" mandatory="true" maxsizemb="2" allowextensions="pdf" ></element>
		
		<element type="hidden" name="LOT" label="" ></element>
		
		<element type="submit" name="submit" value="Submit" class="siteButtons saveDiamondButton"></element>	
		<element type="submit" name="dump" value="Submit &amp; dump data" class="siteButtons saveDiamondButton"></element>	
		<element type="button" name="eventbutton" value="Click event" class="siteButtons saveDiamondButton">
			<events>
				<event type="onclick"><![CDATA[ alert("This click event originates from XML definition of this form!")  ]]></event>
			</events>
		</element>
	</elements>
</form>