Advertisement
Guest User

dodong3

a guest
Sep 19th, 2017
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.04 KB | None | 0 0
  1. <fieldset>
  2.  
  3. <!-- Form Name -->
  4. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
  5. <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  6. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  7.  
  8. <style type="text/css">
  9. /*progressbar*/
  10. #progressbar {
  11. margin-bottom: 30px;
  12. overflow: hidden;
  13. /*CSS counters to number the steps*/
  14. counter-reset: step;
  15. }
  16. #progressbar li {
  17. list-style-type: none;
  18. color: white;
  19. text-transform: uppercase;
  20. font-size: 9px;
  21. width: 33.33%;
  22. float: left;
  23. position: relative;
  24. }
  25. #progressbar li:before {
  26. content: counter(step);
  27. counter-increment: step;
  28. width: 20px;
  29. line-height: 20px;
  30. display: block;
  31. font-size: 10px;
  32. color: #333;
  33. background: white;
  34. border-radius: 3px;
  35. margin: 0 auto 5px auto;
  36. }
  37. /*progressbar connectors*/
  38. #progressbar li:after {
  39. content: '';
  40. width: 100%;
  41. height: 2px;
  42. background: white;
  43. position: absolute;
  44. left: -50%;
  45. top: 9px;
  46. z-index: -1; /*put it behind the numbers*/
  47. }
  48. #progressbar li:first-child:after {
  49. /*connector not needed before the first step*/
  50. content: none;
  51. }
  52. /*marking active/completed steps green*/
  53. /*The number of the step and the connector before it = green*/
  54. #progressbar li.active:before, #progressbar li.active:after{
  55. background: #27AE60;
  56. color: white;
  57. }
  58.  
  59.  
  60. #v_form fieldset:not(:first-of-type) {
  61. display: none;
  62. }
  63. </style>
  64.  
  65. <!-- Text input-->
  66. <h2>Personal Information</h2>
  67. <div class="form-row">
  68. <div class="form-group col-md-5">
  69. <label for="fname" class="col-form-label"><strong>Firstname</strong></label>
  70. <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
  71. </div>
  72. <div class="form-group col-md-2">
  73. <label for="mi" class="col-form-label"><strong>M.I</strong></label>
  74. <input id="mi" name="mi" placeholder="" class="form-control input-md" type="text">
  75. </div>
  76. <div class="form-group col-md-5">
  77. <label for="lname" class="col-form-label"><strong>Lastname</strong></label>
  78. <input id="lname" name="lname" placeholder="" class="form-control input-md" required="" type="text">
  79. </div>
  80. </div>
  81.  
  82. <div class="form-inline">
  83. <div class="form-group col-md-1"></div>
  84. <div class="form-group col-md-4">
  85. <label for="age"><strong>Age</strong></label>
  86. <input id="age" name="age" placeholder="" class="form-control input-md" type="text">
  87. </div>
  88. <div class="form-group col-md-6">
  89. <label for="age"><strong>Sex</strong></label>
  90. <label class="radio-inline"><input name="sex" id="radios-0" value="1" checked="checked" type="radio">Male</label>
  91. <label class="radio-inline"><input name="sex" id="radios-1" value="2" type="radio">Female</label>
  92. </div>
  93. </div>
  94.  
  95. <div class="form-row">
  96. <div class="form-group col-md-8">
  97. <label for="email" class="col-form-label"><strong>Email</strong></label>
  98. <input id="email" name="email" placeholder="" class="form-control input-md" required="" type="text">
  99. </div>
  100.  
  101. <div class="form-group col-md-4">
  102. <label for="tel" class="col-form-label"><strong>Contact No.</strong></label>
  103. <input id="tel" name="tel" placeholder="" class="form-control input-md" required="" type="text">
  104. </div>
  105. </div>
  106.  
  107. <div class="form-row">
  108. <div class="form-group col-md-8">
  109. <label for="company" class="col-form-label"><strong>Company Name</strong></label>
  110. <input id="company" name="company" placeholder="" class="form-control input-md" required="" type="text">
  111. </div>
  112. <div class="form-group col-md-4">
  113. <label for="lname" class="col-form-label"><strong>Category</strong></label>
  114. <select class="form-control" id="exampleFormControlSelect1">
  115. <option>Manufacturer</option>
  116. <option>Trader</option>
  117. <option>Distributor</option>
  118. <option>Drugstore/Retail Outlets</option>
  119. </select>
  120. </div>
  121. </div>
  122. <input type="button" name="next" class="next btn btn-info" value="Next" />
  123. </fieldset>
  124.  
  125. <fieldset>
  126. <h2>Promptness</h2>
  127.  
  128. <div class="form-row">
  129. <div class="form-group col-md-12">
  130. <label for="fname" class="col-form-label">Did the inspector arrive <mark>(within reasonable hours)</mark> on time for the inspection (Indicate the time of arrival of the inspector)?</label>
  131. <div class="radio">
  132. <label><input type="radio" name="optradio">Greater than one (1) hour before the scheduled time</label>
  133. </div>
  134. <div class="radio">
  135. <label><input type="radio" name="optradio">Thirty (30) minutes before the scheduled time</label>
  136. </div>
  137. <div class="radio">
  138. <label><input type="radio" name="optradio">Right on time</label>
  139. </div>
  140. <div class="radio">
  141. <label><input type="radio" name="optradio">Fifteen (15) minutes before the scheduled time</label>
  142. </div>
  143. <div class="radio">
  144. <label><input type="radio" name="optradio">Thirty (30) minutes late</label>
  145. </div>
  146. <div class="radio">
  147. <label><input type="radio" name="optradio">Greater than one (1) hour late</label>
  148. </div>
  149. <div class="radio">
  150. <label><input type="radio" name="optradio">Other:</label>
  151. </div>
  152. </div>
  153.  
  154. <div class="form-group col-md-12">
  155. <label for="fname" class="col-form-label">12. The inspection was conducted in a timely manner (Timeliness)</label>
  156. <div class="radio">
  157. <label><input type="radio" name="optradio">1 Poor</label>
  158. </div>
  159. <div class="radio">
  160. <label><input type="radio" name="optradio">2</label>
  161. </div>
  162. <div class="radio">
  163. <label><input type="radio" name="optradio">3</label>
  164. </div>
  165. <div class="radio">
  166. <label><input type="radio" name="optradio">4</label>
  167. </div>
  168. <div class="radio">
  169. <label><input type="radio" name="optradio">5 Excellent</label>
  170. </div>
  171. </div>
  172.  
  173. </div>
  174. <input type="button" name="previous" class="previous btn btn-default" value="Previous" />
  175. <input type="button" name="next" class="next btn btn-info" value="Next" />
  176.  
  177. </fieldset>
  178.  
  179.  
  180. <fieldset>
  181. <h2>Adherence to Professional Standards of Conduct/Manner/Politeness</h2>
  182.  
  183. <div class="form-row">
  184. <div class="form-group col-md-12">
  185. <label for="fname" class="col-form-label">13. The Inspector was efficient and was able to finish the inspection within a reasonable time</label>
  186. <div class="radio">
  187. <label><input type="radio" name="optradio">1 Poor</label>
  188. </div>
  189. <div class="radio">
  190. <label><input type="radio" name="optradio">2</label>
  191. </div>
  192. <div class="radio">
  193. <label><input type="radio" name="optradio">3</label>
  194. </div>
  195. <div class="radio">
  196. <label><input type="radio" name="optradio">4</label>
  197. </div>
  198. <div class="radio">
  199. <label><input type="radio" name="optradio">5 Excellent</label>
  200. </div>
  201. </div>
  202. <div class="form-group col-md-12">
  203. <label for="fname" class="col-form-label">14. Is the Inspector courteous?</label>
  204. <div class="radio">
  205. <label><input type="radio" name="optradio">1 Poor</label>
  206. </div>
  207. <div class="radio">
  208. <label><input type="radio" name="optradio">2</label>
  209. </div>
  210. <div class="radio">
  211. <label><input type="radio" name="optradio">3</label>
  212. </div>
  213. <div class="radio">
  214. <label><input type="radio" name="optradio">4</label>
  215. </div>
  216. <div class="radio">
  217. <label><input type="radio" name="optradio">5 Excellent</label>
  218. </div>
  219. </div>
  220. <div class="form-group col-md-12">
  221. <label for="fname" class="col-form-label">15. Is the Inspector neat/ in proper uniform? Otherwise, please state your observation</label>
  222. <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
  223. </div>
  224. <div class="form-group col-md-12">
  225. <label for="fname" class="col-form-label">16. Is the Inspector tactful in pointing out critical issues in inspection?</label>
  226. <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
  227. </div>
  228. <div class="form-group col-md-12">
  229. <label for="fname" class="col-form-label">17. Is the Inspector honest and/ or truthful in answering your inquiry or clarification?</label>
  230. <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
  231. </div>
  232. <div class="form-group col-md-12">
  233. <label for="fname" class="col-form-label">18. Did the inspector presented proper identification ID before the conduct of inspection?</label>
  234. <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
  235. </div>
  236. <div class="form-group col-md-12">
  237. <label for="fname" class="col-form-label">19. Is the Inspector fair in his/her recommendations or preparation of reports? If not, cite situations demonstrating otherwise:</label>
  238. <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
  239. </div>
  240. <div class="form-group col-md-12">
  241. <label for="fname" class="col-form-label">20. Did the Inspector discussed the findings of inspection during the exit meeting and provided the summary of report?</label>
  242. <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
  243. </div>
  244. <div class="form-group col-md-12">
  245. <label for="fname" class="col-form-label">21. The inspection was conducted in a fair and objective manner.</label>
  246. <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
  247. </div>
  248. <div class="form-group col-md-12">
  249. <label for="fname" class="col-form-label">22. The Inspector was as unobtrusive and noninterfering as possible to the pharmacy’s routine activities. (Helpfulness)</label>
  250. <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
  251. </div>
  252. </div>
  253. <input type="button" name="previous" class="previous btn btn-default" value="Previous" />
  254. <input type="button" name="next" class="next btn btn-info" value="Next" />
  255. </fieldset>
  256.  
  257. <fieldset>
  258. <h2>Knowledge and Expertise</h2>
  259.  
  260. <div class="form-row">
  261. <div class="form-group col-md-5">
  262. <label for="fname" class="col-form-label"><strong>Firstname</strong></label>
  263. <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
  264. </div>
  265. <div class="form-group col-md-2">
  266. <label for="mi" class="col-form-label"><strong>M.I</strong></label>
  267. <input id="mi" name="mi" placeholder="" class="form-control input-md" type="text">
  268. </div>
  269. <div class="form-group col-md-5">
  270. <label for="lname" class="col-form-label"><strong>Lastname</strong></label>
  271. <input id="lname" name="lname" placeholder="" class="form-control input-md" required="" type="text">
  272. </div>
  273. </div>
  274. <input type="button" name="previous" class="previous btn btn-default" value="Previous" />
  275.  
  276. <input class="btn btn-success" type="submit" name="submit_form" value="submit" />
  277. </fieldset>
  278.  
  279. </form>
  280. <script>
  281. $(document).ready(function(){
  282. var current = 1,current_step,next_step,steps;
  283. steps = $("fieldset").length;
  284. $(".next").click(function(){
  285. current_step = $(this).parent();
  286. next_step = $(this).parent().next();
  287. next_step.show();
  288. current_step.hide();
  289. setProgressBar(++current);
  290. $("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
  291. });
  292. $(".previous").click(function(){
  293. current_step = $(this).parent();
  294. next_step = $(this).parent().prev();
  295. next_step.show();
  296. current_step.hide();
  297. setProgressBar(--current);
  298. });
  299. setProgressBar(current);
  300. // Change progress bar action
  301. function setProgressBar(curStep){
  302. var percent = parseFloat(100 / steps) * curStep;
  303. percent = percent.toFixed();
  304. $(".progress-bar")
  305. .css("width",percent+"%")
  306. .html(percent+"%");
  307. }
  308. });
  309.  
  310.  
  311. </script>
  312.  
  313. <?php
  314. $html = ob_get_clean();
  315. // does the inserting, in case the form is filled and submitted
  316. if ( isset( $_POST["submit_form"] ) && $_POST["fname"] != "" ) {
  317. $table = $wpdb->prefix."my_table";
  318.  
  319. $fname = strip_tags($_POST["fname"], "");
  320. $mi = strip_tags($_POST["mi"], "");
  321. $lname = strip_tags($_POST["lname"], "");
  322. $phone = strip_tags($_POST["phone"], "");
  323. $email = strip_tags($_POST["email"], "");
  324. $sex = strip_tags($_POST["sex"], "");
  325. $age = strip_tags($_POST["age"], "");
  326.  
  327. $wpdb->insert(
  328. $table,
  329. array(
  330. 'fname' => $fname,
  331. 'mi' => $mi,
  332. 'lname' => $lname,
  333. 'phone' => $phone,
  334. 'email' => $email,
  335. 'sex' => $sex,
  336. 'age' => $age
  337. )
  338. );
  339. $html = "<p>Your concern <strong>$fname</strong> was successfully submitted. Thanks!!</p>";
  340. }
  341. // if the form is submitted but the name is empty
  342. if ( isset( $_POST["submit_form"] ) && $_POST["fname"] == "" )
  343. $html .= "<p>You need to fill the required fields.</p>";
  344. // outputs everything
  345. return $html;
  346.  
  347. }
  348. // adds a shortcode you can use: [insert-into-db]
  349. add_shortcode('elh-db-insert', 'elh_insert_into_db');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement