form.html 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <link rel="stylesheet" href="normalize.css">
  8. <link rel="stylesheet" href="style.css">
  9. <title>Document</title>
  10. </head>
  11. <body class="body-- nodebug">
  12. <h1>Full-page form (flexbox fields)</h1>
  13. <form class="form form--full-page" action="#" method="post">
  14. <h1 class="form__title">Form title</h1>
  15. <div class="form__field">
  16. <div class="field" id="input-text">
  17. <label class="field__label" for="text">Text</label>
  18. <input class="field__input input" type="text" name="text" label="Text">
  19. <p class="field__error-help-msg"></p>
  20. </div>
  21. </div>
  22. <div class="form__field">
  23. <div class="field" id="input-radio">
  24. <label class="field__label" for="radio">Radio</label>
  25. <div class="field__input radio radio--grid">
  26. <input class="radio__option" type="radio" value="Option 1" name="radio" id="option-1">
  27. <label class="radio__label" for="option-1">Option 1</label>
  28. <input class="radio__option" type="radio" value="Option 2" name="radio" id="option 2">
  29. <label class="radio__label" for="option-2">Option 2</label>
  30. <input class="radio__option" type="radio" value="Option 3" name="radio" id="option-3">
  31. <label class="radio__label" for="option-3">Option 3</label>
  32. </div>
  33. <p class="field__error-help-msg"></p>
  34. </div>
  35. </div>
  36. <div class="form__field">
  37. <div class="field" id="input-select">
  38. <label class="field__label" for="select">Select</label>
  39. <select class="field__input select" id="select" name="select">
  40. <option class="select__option" value="option-1">Option 1</option>
  41. <option class="select__option" value="option-2">Option 2</option>
  42. <option class="select__option" value="option-3">Option 3</option>
  43. </select>
  44. <p class="field__error-help-msg"></p>
  45. </div>
  46. </div>
  47. <div class="form__field">
  48. <div class="field" id="input-textarea">
  49. <label class="field__label" for="textarea">Textarea</label>
  50. <textarea class="field__input input" id="textarea" type="textarea" name="text" label="Texte" placeholder="Ajouter une note"></textarea>
  51. <p class="field__error-help-msg"></p>
  52. </div>
  53. </div>
  54. <div class="form__field">
  55. <input class="input input--hidden" type="hidden" name="kind" value="internetcontent">
  56. </div>
  57. <button class="form__submit button button-success" type="submit">Go</button>
  58. </form>
  59. <h1>Full-page form (grid fields)</h1>
  60. <form class="form form--full-page" action="#" method="post">
  61. <h1 class="form__title">Form title</h1>
  62. <div class="form__field field field--grid" id="input-text">
  63. <label class="field__label" for="text">Text</label>
  64. <input class="field__input input" type="text" name="text" label="Text">
  65. </div>
  66. <div class="form__field field field--grid" id="input-radio">
  67. <label class="field__label" for="radio">Radio</label>
  68. <div class="field__input radio radio--grid">
  69. <input class="radio__option" type="radio" value="Option 1" name="radio" id="option-1">
  70. <label class="radio__label" for="option-1">Option 1</label>
  71. <input class="radio__option" type="radio" value="Option 2" name="radio" id="option 2">
  72. <label class="radio__label" for="option-2">Option 2</label>
  73. <input class="radio__option" type="radio" value="Option 3" name="radio" id="option-3">
  74. <label class="radio__label" for="option-3">Option 3</label>
  75. </div>
  76. </div>
  77. <div class="form__field field field--grid" id="input-select">
  78. <label class="field__label" for="select">Select</label>
  79. <select class="field__input select" id="select" name="select">
  80. <option class="select__option" value="option-1">Option 1</option>
  81. <option class="select__option" value="option-2">Option 2</option>
  82. <option class="select__option" value="option-3">Option 3</option>
  83. </select>
  84. </div>
  85. <div class="form__field field field--grid" id="input-textarea">
  86. <label class="field__label" for="textarea">Textarea</label>
  87. <textarea class="field__input input" id="textarea" type="textarea" name="text" label="Texte" placeholder="Ajouter une note"></textarea>
  88. </div>
  89. <div class="form__field">
  90. <input class="input input--hidden" type="hidden" name="kind" value="internetcontent">
  91. </div>
  92. <button class="form__submit button button-success" type="submit">Go</button>
  93. </form>
  94. <h1>Full-page form, with errors (grid fields)</h1>
  95. <form class="form form--full-page" action="#" method="post">
  96. <h1 class="form__title">Form title</h1>
  97. <p class="form__error">Please fix the errors</p>
  98. <div class="form__field field field--grid field--error" id="input-text">
  99. <label class="field__label" for="text">Text</label>
  100. <input class="field__input input" type="text" name="text" label="Text">
  101. <p class="field__error">This field is bad, and you should feel bad</p>
  102. </div>
  103. <div class="form__field field field--grid field--error" id="input-radio">
  104. <label class="field__label" for="radio">Radio</label>
  105. <div class="field__input radio radio--grid field--error">
  106. <input class="radio__option" type="radio" value="Option 1" name="radio" id="option-1">
  107. <label class="radio__label" for="option-1">Option 1</label>
  108. <input class="radio__option" type="radio" value="Option 2" name="radio" id="option 2">
  109. <label class="radio__label" for="option-2">Option 2</label>
  110. <input class="radio__option" type="radio" value="Option 3" name="radio" id="option-3">
  111. <label class="radio__label" for="option-3">Option 3</label>
  112. </div>
  113. <p class="field__error">This field is bad, and you should feel bad</p>
  114. </div>
  115. <div class="form__field field field--grid field--error" id="input-select">
  116. <label class="field__label" for="select">Select</label>
  117. <select class="field__input select" id="select" name="select">
  118. <option class="select__option" value="option-1">Option 1</option>
  119. <option class="select__option" value="option-2">Option 2</option>
  120. <option class="select__option" value="option-3">Option 3</option>
  121. </select>
  122. <p class="field__error">This field is bad, and you should feel bad</p>
  123. </div>
  124. <div class="form__field field field--grid field--error" id="input-textarea">
  125. <label class="field__label" for="textarea">Textarea</label>
  126. <textarea class="field__input input" id="textarea" type="textarea" name="text" label="Texte" placeholder="Ajouter une note"></textarea>
  127. <p class="field__error">This field is bad, and you should feel bad</p>
  128. </div>
  129. <div class="form__field">
  130. <input class="input input--hidden" type="hidden" name="kind" value="internetcontent">
  131. </div>
  132. <button class="form__submit button button-success" type="submit">Go</button>
  133. </form>
  134. <h1>Inline forms</h1>
  135. <form class="form form--horizontal" action="#" method="post">
  136. <div class="form__field">
  137. <div class="field" id="input-text">
  138. <label class="field__label" for="text">Text</label>
  139. <input class="field__input input" type="text" name="text" label="Text">
  140. </div>
  141. </div>
  142. <button class="form__submit button button-success" type="submit">Go</button>
  143. </form>
  144. <form class="form form--horizontal" action="#" method="post">
  145. <div class="form__field">
  146. <div class="field" id="input-select">
  147. <label class="field__label" for="select">Select</label>
  148. <select class="field__input select" id="select" name="select">
  149. <option class="select__option" value="option-1">Option 1</option>
  150. <option class="select__option" value="option-2">Option 2</option>
  151. <option class="select__option" value="option-3">Option 3</option>
  152. </select>
  153. <p class="field__error-help-msg"></p>
  154. </div>
  155. </div>
  156. <button class="form__submit button button-success" type="submit">Go</button>
  157. </form>
  158. <h1>Tag-like forms</h1>
  159. <form class="form form--inline" action="#" method="post">
  160. <h1 class="form__title">the tag</h1>
  161. <button class="form__submit button button--inline button--danger" type="submit">&times;</button>
  162. </form>
  163. </body>
  164. </html>