Guest User

Untitled

a guest
Apr 4th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <link rel="stylesheet" type="text/css" href = "https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css">
  5. <link rel="stylesheet" type="text/css" href = "https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10/components/form.css">
  6. <script src = "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"> </script>
  7. <script src = "https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10/semantic.min.js"> </script>
  8. <script src = "https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.10/components/form.js"> </script>
  9. </head>
  10. <body>
  11. <script>
  12. $('.ui.form')
  13. .form({
  14. fields: {
  15. name: {
  16. identifier: 'name',
  17. rules: [
  18. {
  19. type : 'empty',
  20. prompt : 'Please enter your name'
  21. }
  22. ]
  23. },
  24. skills: {
  25. identifier: 'skills',
  26. rules: [
  27. {
  28. type : 'minCount[2]',
  29. prompt : 'Please select at least two skills'
  30. }
  31. ]
  32. },
  33. gender: {
  34. identifier: 'gender',
  35. rules: [
  36. {
  37. type : 'empty',
  38. prompt : 'Please select a gender'
  39. }
  40. ]
  41. },
  42. username: {
  43. identifier: 'username',
  44. rules: [
  45. {
  46. type : 'empty',
  47. prompt : 'Please enter a username'
  48. }
  49. ]
  50. },
  51. password: {
  52. identifier: 'password',
  53. rules: [
  54. {
  55. type : 'empty',
  56. prompt : 'Please enter a password'
  57. },
  58. {
  59. type : 'minLength[6]',
  60. prompt : 'Your password must be at least {ruleValue} characters'
  61. }
  62. ]
  63. },
  64. terms: {
  65. identifier: 'terms',
  66. rules: [
  67. {
  68. type : 'checked',
  69. prompt : 'You must agree to the terms and conditions'
  70. }
  71. ]
  72. }
  73. }
  74. })
  75. ;
  76. </script>
  77.  
  78. <form class="ui form segment">
  79. <p>Tell Us About Yourself</p>
  80. <div class="two fields">
  81. <div class="field">
  82. <label>Name</label>
  83. <input placeholder="First Name" name="name" type="text">
  84. </div>
  85. <div class="field">
  86. <label>Gender</label>
  87. <select class="ui dropdown" name="gender">
  88. <option value="">Gender</option>
  89. <option value="male">Male</option>
  90. <option value="female">Female</option>
  91. </select>
  92. </div>
  93. </div>
  94. <div class="two fields">
  95. <div class="field">
  96. <label>Username</label>
  97. <input placeholder="Username" name="username" type="text">
  98. </div>
  99. <div class="field">
  100. <label>Password</label>
  101. <input type="password" name="password">
  102. </div>
  103. </div>
  104. <div class="field">
  105. <label>Skills</label>
  106. <select name="skills" multiple="" class="ui dropdown">
  107. <option value="">Select Skills</option>
  108. <option value="css">CSS</option>
  109. <option value="html">HTML</option>
  110. <option value="javascript">Javascript</option>
  111. <option value="design">Graphic Design</option>
  112. <option value="plumbing">Plumbing</option>
  113. <option value="mech">Mechanical Engineering</option>
  114. <option value="repair">Kitchen Repair</option>
  115. </select>
  116. </div>
  117. <div class="inline field">
  118. <div class="ui checkbox">
  119. <input type="checkbox" name="terms">
  120. <label>I agree to the terms and conditions</label>
  121. </div>
  122. </div>
  123. <div class="ui blue submit button">Submit</div>
  124. <div class="ui error message"></div>
  125. </form>
  126. </body>
  127. </html>
  128.  
  129. $(document).ready(function(){
  130. // and here your code
  131. });
Add Comment
Please, Sign In to add comment