PHP Classes

File: quidich_form.xml

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  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: 2 years ago
Size: 3,578 bytes


Class file image Download
<?xml version="1.0" encoding="UTF-8"?>
<form action="example1_process.php" method="POST" enctype="multipart/form-data">
		<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." >
				<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" />
		<element type="checkbox" name="BROOMSTICKS" label="Select the broomsticks you have" direction="vertical" >
				<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" />
		<element type="checkbox" name="RECEIVE_OFFERS" label="Receive special offers?">
				<option value="yes" label="Yes"/>
		<element type="radio" name="MATCHES_PLAYED" label="How many matches have you played?" direction="vertical" >
				<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"/>
		<element type="dropdown" name="HOUSE" label="Which house you are from?" prompt="Select your house" >
				<query valueField="HOUSE_ID" labelField="NAME"><![CDATA[
					SELECT * FROM houses;
		<element type="radio" name="IS_SEPARABLE" label="Is Separable?" >
				<option value="True" label="Yes"/>
				<option value="False" label="No"/>
		<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">
				<event type="onclick"><![CDATA[ alert("This click event originates from XML definition of this form!")  ]]></event>