|
| 1 | +--- |
| 2 | +title: Forms |
| 3 | + |
| 4 | +order: 70 |
| 5 | +--- |
| 6 | + |
| 7 | +{%- capture code -%}<form class="max-w-2xl p-4 mx-auto bg-white rounded lg:p-12" method="POST"> |
| 8 | + <ul class="space-y-6"> |
| 9 | + <li> |
| 10 | + <label for="fullname">Full Name</label> |
| 11 | + <input type="text" name="fullname" id="fullname" placeholder="Your name" required> |
| 12 | + </li> |
| 13 | + <li> |
| 14 | + <label for="email">Email</label> |
| 15 | + <input type="email" name="email" id="email" placeholder="Your email" required> |
| 16 | + </li> |
| 17 | + <li> |
| 18 | + <label for="password">Password</label> |
| 19 | + <input type="password" name="password" id="password" placeholder="Your password" required> |
| 20 | + </li> |
| 21 | + <li> |
| 22 | + <fieldset> |
| 23 | + <legend>T-shirt Size</legend> |
| 24 | + <label for="size-small"> |
| 25 | + <input type="radio" name="gender" id="size-small" value="small" required> |
| 26 | + Small |
| 27 | + </label> |
| 28 | + <label for="size-medium"> |
| 29 | + <input type="radio" name="gender" id="size-medium" value="medium" required> |
| 30 | + Medium |
| 31 | + </label> |
| 32 | + <label for="size-large"> |
| 33 | + <input type="radio" name="gender" id="size-large" value="large" required> |
| 34 | + Large |
| 35 | + </label> |
| 36 | + </fieldset> |
| 37 | + </li> |
| 38 | + <li> |
| 39 | + <fieldset> |
| 40 | + <legend>Interests</legend> |
| 41 | + <label for="interest-django"> |
| 42 | + <input type="checkbox" name="interests" id="interest-django" value="django"> |
| 43 | + Django |
| 44 | + </label> |
| 45 | + <label for="interest-python"> |
| 46 | + <input type="checkbox" name="interests" id="interest-python" value="python"> |
| 47 | + Python |
| 48 | + </label> |
| 49 | + <label for="interest-ml"> |
| 50 | + <input type="checkbox" name="interests" id="interest-ml" value="ml"> |
| 51 | + Machine Learning |
| 52 | + </label> |
| 53 | + </fieldset> |
| 54 | + </li> |
| 55 | + <li> |
| 56 | + <label for="country">Country</label> |
| 57 | + <select name="country" id="country" required> |
| 58 | + <option value="">Select your country</option> |
| 59 | + <option value="us">United States</option> |
| 60 | + <option value="ca">Canada</option> |
| 61 | + <option value="uk">United Kingdom</option> |
| 62 | + <option value="au">Australia</option> |
| 63 | + </select> |
| 64 | + </li> |
| 65 | + <li> |
| 66 | + <label for="message">Message</label> |
| 67 | + <textarea name="message" id="message" placeholder="Your message" required></textarea> |
| 68 | + </li> |
| 69 | + </ul> |
| 70 | + |
| 71 | + <div class="mt-8"> |
| 72 | + <button id="submit" type="submit" class="button bg-light-blue">Submit</button> |
| 73 | + </div> |
| 74 | +</form> |
| 75 | +{%- endcapture -%} |
| 76 | + |
| 77 | +<div> |
| 78 | + {% include "code-snippet.html", code:code, lang:'html' %} |
| 79 | +</div> |
0 commit comments