File: forms-sample-selfsubmit.php

package info (click to toggle)
jquery-mobile 1.2.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,068 kB
  • ctags: 243
  • sloc: php: 113; makefile: 54
file content (123 lines) | stat: -rwxr-xr-x 5,345 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html> 
<html> 
	<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1"> 
	<title>jQuery Mobile Docs - Sample Form Submit to Self</title> 
	<link rel="stylesheet"  href="../../css/themes/default/jquery.mobile-1.2.0.css" />  
	<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
	<script src="../../js/jquery.js"></script>
	
	<script src="../../docs/_assets/js/jqm-docs.js"></script>
	<script src="../../js/jquery.mobile-1.2.0.js"></script>
</head> 
<body> 

	<div data-role="page" class="type-interior">

		<div data-role="header" data-theme="f">
		<h1>Sample form submit to self</h1>
		<a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
		<a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
	</div><!-- /header -->

	<div data-role="content" data-theme="c">
		<div class="content-primary">
		
		<form action="forms-sample-selfsubmit.php" method="post">
			
		    	<?php if ( isset ( $_REQUEST['submit'] ) ) { $submit = $_REQUEST['submit']; } else { $submit = ""; }
				if ( isset ( $_REQUEST['layout'] ) ) { $layout = $_REQUEST['layout']; } else { $layout = ""; }
				if ( isset ( $_REQUEST['title'] ) ) { $title = $_REQUEST['title']; } else { $title = ""; }
				if ( isset ( $_REQUEST['timeout'] ) ) { $timeout = $_REQUEST['timeout']; } else { $timeout = "0"; }
				if ( isset ( $_REQUEST['transition'] ) ) { $transition = $_REQUEST['transition']; } else { $transition = ""; }
			?>

			<div data-role="fieldcontain">
				<label for="title">Title:</label>
				<input type="text" name="title" id="title" placeholder="diashow title"value="<?php echo $title ?>" />
			</div>

			<div data-role="fieldcontain">
			    <fieldset data-role="controlgroup" data-type="horizontal">
			     	<legend>Preview:</legend>
			         	<input type="radio" name="layout" id="layout-radio-a" value="List" <?php echo $layout=="List" ? "checked" : "" ?> />
			         	<label for="layout-radio-a">List</label>
			         	<input type="radio" name="layout" id="layout-radio-b" value="Grid" <?php echo $layout=="Grid" ? "checked" : "" ?> />
			         	<label for="layout-radio-b">Grid</label>
			         	<input type="radio" name="layout" id="layout-radio-c" value="Gallery" <?php echo $layout=="Gallery" ? "checked" : "" ?> />
			         	<label for="layout-radio-c">Gallery</label>
			    </fieldset>
			</div>

			<div data-role="fieldcontain">
				<label for="timeout">Timeout:</label>
			 	<input type="range" name="timeout" id="timeout" value="<?php echo $timeout ?>" min="0" max="150" step="10" data-highlight="true"  />
			</div>

			<div data-role="fieldcontain">
			    <fieldset data-role="controlgroup">
			    	<legend>Transition:</legend>
			         	<input type="radio" name="transition" id="transition-1" value="Pop" <?php echo $transition=="Pop" ? "checked" : "" ?>/>
			         	<label for="transition-1">Pop</label>

			         	<input type="radio" name="transition" id="transition-2" value="Fade" <?php echo $transition=="Fade" ? "checked" : "" ?> />
			         	<label for="transition-2">Fade</label>

			         	<input type="radio" name="transition" id="transition-3" value="Slide" <?php echo $transition=="Slide" ? "checked" : "" ?> />
			         	<label for="transition-3">Slide</label>
			    </fieldset>
			</div>
			
			<button type="submit" name="submit" value="submit" data-theme="b">Submit</button>
		</form>

		<h2><?php echo $submit == "" ? "Please fill in the form and press submit" : "You chose:" ?></h2>
		<div class="ui-body ui-body-d ui-corner-all">
			<p>Title: <strong><?php echo $submit == "" ? "-" : $title ?></strong></p>
			<p>Preview: <strong><?php echo $submit == "" ? "-" : $layout ?></strong></p>
			<p>Timeout: <strong><?php echo $submit == "" ? "-" : $timeout ?></strong></p>
			<p>Transition: <strong><?php echo $submit == "" ? "-" : $transition ?></strong></p>
		</div>
	
	</div><!--/content-primary -->		
	
	<div class="content-secondary">
		
		<div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
			
				<h3>More in this section</h3>
				
				<ul data-role="listview" data-theme="c" data-dividertheme="d">
				
					<li data-role="list-divider">Form elements</li>
					<li><a href="docs-forms.html">Form basics</a></li>
					<li><a href="forms-all.html">Form element gallery</a></li>
					<li><a href="forms-all-mini.html">Mini form element gallery</a></li>
					<li><a href="textinputs/">Text inputs</a></li>
					<li><a href="search/">Search inputs</a></li>
					<li><a href="slider/">Slider</a></li>
					<li><a href="switch/">Flip toggle switch</a></li>
					<li><a href="radiobuttons/">Radio buttons</a></li>
					<li><a href="checkboxes/">Checkboxes</a></li>
					<li><a href="forms-selects.html">Select menus</a></li>
					<li><a href="forms-themes.html">Theming forms</a></li>
					<li><a href="forms-all-native.html">Native form elements</a></li>
					<li data-theme="a"><a href="forms-sample.html">Submitting forms</a></li>
					
	
				</ul>
		</div>
	</div>		

</div><!-- /content -->

<div data-role="footer" class="footer-docs" data-theme="c">
		<p class="jqm-version"></p>
		<p>&copy; 2012 jQuery Foundation and other contributors</p>
</div>
	
</div><!-- /page -->

</body>
</html>