Course Enrollment Form

Use this minimal HTML course enrollment form on your website to allow students to sign up for your courses quickly and easily, streamlining the registration process.
Preview Preview
Code Code
        
HTML HTML Copy Copy
<form action="https://formspree.io/f/{FORM_ID}" class="fs-form fs-layout__2-column" target="_top" method="POST" > <div class="fs-field"> <label class="fs-label" for="name">Full Name</label> <input class="fs-input" id="name" name="name" required /> </div> <div class="fs-field"> <label class="fs-label" for="email">Student Email</label> <input class="fs-input" id="email" name="email" required /> </div> <div class="fs-field"> <label class="fs-label" for="gender">Gender</label> <input class="fs-input" id="gender" name="gender" required /> </div> <div class="fs-field"> <label class="fs-label" for="phone">Phone Number</label> <input class="fs-input" id="phone" name="phone" placeholder="(000) 000-0000" required /> </div> <fieldset> <div class="fs-field"> <label class="fs-label" for="address-1">Address line 1</label> <input class="fs-input" id="address-1" name="address-1" /> </div> <div class="fs-field"> <label class="fs-label" for="address-2">Address line 2</label> <input class="fs-input" id="address-2" name="address-2" /> </div> <div class="fs-field"> <label class="fs-label" for="city">City</label> <input class="fs-input" id="city" name="city" /> </div> <div class="fs-field"> <label class="fs-label" for="state">State / Province</label> <input class="fs-input" id="state" name="state" /> </div> <div class="fs-field"> <label class="fs-label" for="zip-code">Postal / Zip Code</label> <input class="fs-input" id="zip-code" name="zip-code" /> </div> </fieldset> <div class="fs-field"> <label class="fs-label"> Please select the courses you wish to enrol for </label> <div class="fs-checkbox-group"> <div class="fs-checkbox-field"> <div class="fs-checkbox-wrapper"> <input class="fs-checkbox" id="courses-cs-101" name="courses" required type="checkbox" value="cs-101" /> </div> <div> <label class="fs-label" for="courses-cs-101"> Introduction to Computing </label> </div> </div> <div class="fs-checkbox-field"> <div class="fs-checkbox-wrapper"> <input class="fs-checkbox" id="courses-e-101" name="courses" required type="checkbox" value="e-101" /> </div> <div> <label class="fs-label" for="courses-e-101">English 101</label> </div> </div> <div class="fs-checkbox-field"> <div class="fs-checkbox-wrapper"> <input class="fs-checkbox" id="courses-e-102" name="courses" required type="checkbox" value="e-102" /> </div> <div> <label class="fs-label" for="courses-e-102">English 102</label> </div> </div> <div class="fs-checkbox-field"> <div class="fs-checkbox-wrapper"> <input class="fs-checkbox" id="courses-h-101" name="courses" required type="checkbox" value="h-101" /> </div> <div> <label class="fs-label" for="courses-h-101">History 101</label> </div> </div> <div class="fs-checkbox-field"> <div class="fs-checkbox-wrapper"> <input class="fs-checkbox" id="courses-h-102" name="courses" required type="checkbox" value="h-102" /> </div> <div> <label class="fs-label" for="courses-h-102">History 102</label> </div> </div> <div class="fs-checkbox-field"> <div class="fs-checkbox-wrapper"> <input class="fs-checkbox" id="courses-em-1" name="courses" required type="checkbox" value="em-1" /> </div> <div> <label class="fs-label" for="courses-em-1">Engineering Maths 1</label> </div> </div> <div class="fs-checkbox-field"> <div class="fs-checkbox-wrapper"> <input class="fs-checkbox" id="courses-em-2" name="courses" required type="checkbox" value="em-2" /> </div> <div> <label class="fs-label" for="courses-em-2">Engineering Maths 2</label> </div> </div> </div> </div> <div class="fs-field"> <label class="fs-label" for="comments">Additional comments</label> <textarea class="fs-textarea" id="comments" name="comments"></textarea> </div> <div class="fs-button-group"> <button class="fs-button" type="submit">Submit</button> </div> </form> Show more
CSS CSS Copy Copy
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"); /** Variables **/ :root { --color-background: #cbd5e1; --color-background-alt: #3a9092; --color-border-active: #23494c; --color-border-default: #94a3b8; --color-highlight: #7ecac7; --color-primary: #23494c; --color-primary-active: #122d30; --color-text-default: #0f172a; --color-text-muted: #475569; --font-family-body: "Inter", sans-serif; } /** Base **/ *, ::before, ::after { box-sizing: border-box; } * { border: 0; margin: 0; padding: 0; } body { -webkit-font-smoothing: antialiased; font-family: var(--font-family-body); font-optical-sizing: auto; font-style: normal; } button, input, optgroup, select, textarea { font-family: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-size: 100%; font-weight: inherit; line-height: inherit; color: inherit; margin: 0; padding: 0; } [type="checkbox"], [type="radio"], [type="range"] { appearance: none; flex-shrink: 0; padding: 0; user-select: none; } [type="checkbox"]:focus, [type="radio"]:focus, [type="range"]:focus { outline: none; } /** Components **/ .fs-form { display: grid; row-gap: 1rem; } .fs-form:where(.fs-layout__2-column) { column-gap: 0.75rem; grid-template-columns: 1fr 1fr; } fieldset { display: grid; row-gap: 1rem; } .fs-form:where(.fs-layout__2-column) fieldset { column-gap: 0.75rem; grid-template-columns: 1fr 1fr; grid-column: 1 / -1; } .fs-field { display: flex; flex-direction: column; row-gap: 0.375rem; } .fs-label { color: var(--color-text-default); display: block; font-family: var(--font-family-display); font-size: 0.875rem; font-weight: 500; line-height: 1.25rem; } .fs-description { color: var(--color-text-muted); display: block; font-size: 0.875rem; line-height: 1.25rem; } .fs-button-group { display: flex; flex-direction: row-reverse; column-gap: 0.75rem; } .fs-form:where(.fs-layout__2-column) .fs-button-group { grid-column: 1 / -1; } .fs-button { background-color: var(--color-primary); border-radius: 0.375rem; color: white; cursor: pointer; font-size: 0.875rem; font-weight: 500; line-height: 1rem; padding: 1rem 2rem; transition-duration: 200ms; transition-property: background-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); } .fs-button:hover { background-color: var(--color-primary-active); } .fs-button:focus-visible { background-color: var(--color-primary-active); outline: 3px solid var(--color-highlight); } .fs-input, .fs-select { appearance: none; border-radius: 0.375rem; border-width: 0; box-shadow: var(--color-border-default) 0 0 0 1px inset; color: var(--color-primary); font-size: 0.875rem; height: 2rem; line-height: 1.25rem; outline: none; padding-left: 0.75rem; padding-right: 0.75rem; } .fs-input:focus-visible, .fs-select:focus-visible { box-shadow: var(--color-border-active) 0 0 0 1.5px inset; outline: 3px solid var(--color-highlight); outline-offset: 0; } .fs-input::placeholder { color: var(--color-text-muted); } .fs-checkbox-group, .fs-radio-group { display: flex; flex-direction: column; row-gap: 0.5rem; } .fs-checkbox-field, .fs-radio-field { column-gap: 0.5rem; display: flex; } :is(.fs-checkbox-field, .fs-radio-field) .fs-label + .fs-description { margin-top: 0.125rem; } .fs-checkbox-wrapper, .fs-radio-wrapper { align-items: center; display: flex; height: 1.25rem; } .fs-checkbox, .fs-radio { background-color: #fff; border: 1px solid var(--color-primary); height: 1rem; width: 1rem; } .fs-checkbox { border-radius: 0.25rem; } .fs-radio { border-radius: 100%; } .fs-checkbox:checked, .fs-radio:checked { background-color: var(--color-primary); background-position: center; background-repeat: no-repeat; background-size: 100% 100%; border-color: transparent; } .fs-checkbox:checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); } .fs-radio:checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); } .fs-checkbox:focus-visible, .fs-radio:focus-visible { outline: 3px solid var(--color-highlight); outline-offset: 0; } .fs-select { background-color: #fff; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); background-position: right 0.5rem center; background-repeat: no-repeat; background-size: 1.5em 1.5em; padding-right: 2.5rem; } .fs-slider { background: transparent; cursor: pointer; height: 1.25rem; width: 100%; } .fs-slider::-moz-range-track { background-color: var(--color-background); border-radius: 0.5rem; height: 0.5rem; } .fs-slider::-webkit-slider-runnable-track { background-color: var(--color-background); border-radius: 0.5rem; height: 0.5rem; } .fs-slider::-moz-range-thumb { background-color: var(--color-primary); border: none; /* Removes extra border that FF applies */ border-radius: 50%; height: 1.25rem; width: 1.25rem; } .fs-slider::-webkit-slider-thumb { appearance: none; background-color: var(--color-primary); border-radius: 50%; height: 1.25rem; margin-top: -0.375rem; /* Centers thumb on the track */ width: 1.25rem; } .fs-slider:focus-visible::-moz-range-thumb { outline: 2px solid var(--color-primary); outline-offset: 2px; } .fs-slider:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--color-primary); outline-offset: 2px; } .fs-switch-field { align-items: center; column-gap: 0.75rem; display: flex; justify-content: space-between; } .fs-switch { background-color: var(--color-background-alt); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='white'/%3e%3c/svg%3e"); background-position: left center; background-repeat: no-repeat; border-radius: 1.5rem; cursor: pointer; height: 1.5rem; transition-duration: 200ms; transition-property: background-color, background-position; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); width: 2.75rem; } .fs-switch:checked { background-color: var(--color-primary); background-position: right center; } .fs-switch:focus-visible { outline: 3px solid var(--color-highlight); outline-offset: 0; } .fs-textarea { appearance: none; border-radius: 0.375rem; border-width: 0; box-shadow: var(--color-border-default) 0 0 0 1px inset; color: var(--color-primary); font-size: 0.875rem; line-height: 1.25rem; outline: none; padding: 0.5rem 0.75rem; resize: vertical; } .fs-textarea:focus-visible { box-shadow: var(--color-border-active) 0 0 0 1.5px inset; outline: 3px solid var(--color-highlight); outline-offset: 0; } .fs-textarea::placeholder { color: var(--color-text-muted); } Show more
        
HTML HTML/Tailwind Copy Copy
<form action="https://formspree.io/f/{FORM_ID}" class="grid grid-cols-2 gap-x-3 gap-y-4" target="_top" method="POST" > <div class="flex flex-col gap-y-1.5"> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="name" > Full Name </label> <input class="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="name" name="name" required /> </div> <div class="flex flex-col gap-y-1.5"> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="email" > Student Email </label> <input class="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="email" name="email" required /> </div> <div class="flex flex-col gap-y-1.5"> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="gender" > Gender </label> <input class="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="gender" name="gender" required /> </div> <div class="flex flex-col gap-y-1.5"> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="phone" > Phone Number </label> <input class="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="phone" name="phone" placeholder="(000) 000-0000" required /> </div> <fieldset> <div class="flex flex-col gap-y-1.5"> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="address-1" > Address line 1 </label> <input class="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="address-1" name="address-1" /> </div> <div class="flex flex-col gap-y-1.5"> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="address-2" > Address line 2 </label> <input class="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="address-2" name="address-2" /> </div> <div class="flex flex-col gap-y-1.5"> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="city" > City </label> <input class="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="city" name="city" /> </div> <div class="flex flex-col gap-y-1.5"> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="state" > State / Province </label> <input class="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="state" name="state" /> </div> <div class="flex flex-col gap-y-1.5"> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="zip-code" > Postal / Zip Code </label> <input class="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="zip-code" name="zip-code" /> </div> </fieldset> <div class="flex flex-col gap-y-1.5"> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" > Please select the courses you wish to enrol for </label> <div class="flex flex-col gap-y-2"> <div class="flex gap-x-2"> <div class="flex h-5 items-center"> <input class="checked:bg-checkbox-checked h-4 w-4 rounded border border-solid border-[--color-primary] bg-white checked:border-transparent checked:bg-[--color-primary] checked:bg-[size:100%_100%] checked:bg-center checked:bg-no-repeat focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight]" id="courses-cs-101" name="courses" required type="checkbox" value="cs-101" /> </div> <div> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="courses-cs-101" > Introduction to Computing </label> </div> </div> <div class="flex gap-x-2"> <div class="flex h-5 items-center"> <input class="checked:bg-checkbox-checked h-4 w-4 rounded border border-solid border-[--color-primary] bg-white checked:border-transparent checked:bg-[--color-primary] checked:bg-[size:100%_100%] checked:bg-center checked:bg-no-repeat focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight]" id="courses-e-101" name="courses" required type="checkbox" value="e-101" /> </div> <div> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="courses-e-101" > English 101 </label> </div> </div> <div class="flex gap-x-2"> <div class="flex h-5 items-center"> <input class="checked:bg-checkbox-checked h-4 w-4 rounded border border-solid border-[--color-primary] bg-white checked:border-transparent checked:bg-[--color-primary] checked:bg-[size:100%_100%] checked:bg-center checked:bg-no-repeat focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight]" id="courses-e-102" name="courses" required type="checkbox" value="e-102" /> </div> <div> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="courses-e-102" > English 102 </label> </div> </div> <div class="flex gap-x-2"> <div class="flex h-5 items-center"> <input class="checked:bg-checkbox-checked h-4 w-4 rounded border border-solid border-[--color-primary] bg-white checked:border-transparent checked:bg-[--color-primary] checked:bg-[size:100%_100%] checked:bg-center checked:bg-no-repeat focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight]" id="courses-h-101" name="courses" required type="checkbox" value="h-101" /> </div> <div> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="courses-h-101" > History 101 </label> </div> </div> <div class="flex gap-x-2"> <div class="flex h-5 items-center"> <input class="checked:bg-checkbox-checked h-4 w-4 rounded border border-solid border-[--color-primary] bg-white checked:border-transparent checked:bg-[--color-primary] checked:bg-[size:100%_100%] checked:bg-center checked:bg-no-repeat focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight]" id="courses-h-102" name="courses" required type="checkbox" value="h-102" /> </div> <div> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="courses-h-102" > History 102 </label> </div> </div> <div class="flex gap-x-2"> <div class="flex h-5 items-center"> <input class="checked:bg-checkbox-checked h-4 w-4 rounded border border-solid border-[--color-primary] bg-white checked:border-transparent checked:bg-[--color-primary] checked:bg-[size:100%_100%] checked:bg-center checked:bg-no-repeat focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight]" id="courses-em-1" name="courses" required type="checkbox" value="em-1" /> </div> <div> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="courses-em-1" > Engineering Maths 1 </label> </div> </div> <div class="flex gap-x-2"> <div class="flex h-5 items-center"> <input class="checked:bg-checkbox-checked h-4 w-4 rounded border border-solid border-[--color-primary] bg-white checked:border-transparent checked:bg-[--color-primary] checked:bg-[size:100%_100%] checked:bg-center checked:bg-no-repeat focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight]" id="courses-em-2" name="courses" required type="checkbox" value="em-2" /> </div> <div> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="courses-em-2" > Engineering Maths 2 </label> </div> </div> </div> </div> <div class="flex flex-col gap-y-1.5"> <label class="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" for="comments" > Additional comments </label> <textarea class="resize-y appearance-none rounded-md border-0 px-3 py-2 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="comments" name="comments" ></textarea> </div> <div class="col-span-full flex flex-row-reverse gap-x-3"> <button class="cursor-pointer rounded-md bg-[--color-primary] px-8 py-4 text-sm font-medium leading-4 text-white transition-colors duration-200 hover:bg-[--color-primary-active] focus-visible:bg-[--color-primary-active] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-[--color-highlight]" type="submit" > Submit </button> </div> </form> Show more
CSS CSS Copy Copy
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"); @tailwind base; @tailwind components; @tailwind utilities; @layer base { :root { --color-background: #cbd5e1; --color-background-alt: #3a9092; --color-border-active: #23494c; --color-border-default: #94a3b8; --color-highlight: #7ecac7; --color-primary: #23494c; --color-primary-active: #122d30; --color-text-default: #0f172a; --color-text-muted: #475569; --font-family-body: "Inter", sans-serif; } *, ::before, ::after { box-sizing: border-box; } * { border: 0; margin: 0; padding: 0; } body { -webkit-font-smoothing: antialiased; font-family: var(--font-family-body); font-optical-sizing: auto; font-style: normal; } button, input, optgroup, select, textarea { font-family: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-size: 100%; font-weight: inherit; line-height: inherit; color: inherit; margin: 0; padding: 0; } [type="checkbox"], [type="radio"], [type="range"] { appearance: none; flex-shrink: 0; padding: 0; user-select: none; } [type="checkbox"]:focus, [type="radio"]:focus, [type="range"]:focus { outline: none; } } @layer components { .fs-slider { background: transparent; cursor: pointer; height: 1.25rem; width: 100%; } .fs-slider::-moz-range-track { background-color: var(--color-background); border-radius: 0.5rem; height: 0.5rem; } .fs-slider::-webkit-slider-runnable-track { background-color: var(--color-background); border-radius: 0.5rem; height: 0.5rem; } .fs-slider::-moz-range-thumb { background-color: var(--color-primary); border: none; /* Removes extra border that FF applies */ border-radius: 50%; height: 1.25rem; width: 1.25rem; } .fs-slider::-webkit-slider-thumb { appearance: none; background-color: var(--color-primary); border-radius: 50%; height: 1.25rem; margin-top: -0.375rem; /* Centers thumb on the track */ width: 1.25rem; } .fs-slider:focus-visible::-moz-range-thumb { outline: 2px solid var(--color-primary); outline-offset: 2px; } .fs-slider:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--color-primary); outline-offset: 2px; } } @layer utilities { .bg-caret-down { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); } .bg-checkbox-checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); } .bg-radio-checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); } .bg-switch-thumb { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='white'/%3e%3c/svg%3e"); } } Show more
        
HTML React Copy Copy
// Make sure to run npm install @formspree/react // For more help visit https://formspr.ee/react-help import React from "react"; import { useForm, ValidationError } from "@formspree/react"; export function ExampleForm() { const [state, handleSubmit] = useForm("FORM_ID"); if (state.succeeded) { return <p>Thanks for joining!</p>; } return ( <form className="fs-form fs-layout__2-column" onSubmit={handleSubmit}> <div className="fs-field"> <label className="fs-label" htmlFor="name"> Full Name </label> <input className="fs-input" id="name" name="name" required /> </div> <div className="fs-field"> <label className="fs-label" htmlFor="email"> Student Email </label> <input className="fs-input" id="email" name="email" required /> </div> <div className="fs-field"> <label className="fs-label" htmlFor="gender"> Gender </label> <input className="fs-input" id="gender" name="gender" required /> </div> <div className="fs-field"> <label className="fs-label" htmlFor="phone"> Phone Number </label> <input className="fs-input" id="phone" name="phone" placeholder="(000) 000-0000" required /> </div> <fieldset> <div className="fs-field"> <label className="fs-label" htmlFor="address-1"> Address line 1 </label> <input className="fs-input" id="address-1" name="address-1" /> </div> <div className="fs-field"> <label className="fs-label" htmlFor="address-2"> Address line 2 </label> <input className="fs-input" id="address-2" name="address-2" /> </div> <div className="fs-field"> <label className="fs-label" htmlFor="city"> City </label> <input className="fs-input" id="city" name="city" /> </div> <div className="fs-field"> <label className="fs-label" htmlFor="state"> State / Province </label> <input className="fs-input" id="state" name="state" /> </div> <div className="fs-field"> <label className="fs-label" htmlFor="zip-code"> Postal / Zip Code </label> <input className="fs-input" id="zip-code" name="zip-code" /> </div> </fieldset> <div className="fs-field"> <label className="fs-label"> Please select the courses you wish to enrol for </label> <div className="fs-checkbox-group"> <div className="fs-checkbox-field"> <div className="fs-checkbox-wrapper"> <input className="fs-checkbox" id="courses-cs-101" name="courses" required type="checkbox" value="cs-101" /> </div> <div> <label className="fs-label" htmlFor="courses-cs-101"> Introduction to Computing </label> </div> </div> <div className="fs-checkbox-field"> <div className="fs-checkbox-wrapper"> <input className="fs-checkbox" id="courses-e-101" name="courses" required type="checkbox" value="e-101" /> </div> <div> <label className="fs-label" htmlFor="courses-e-101"> English 101 </label> </div> </div> <div className="fs-checkbox-field"> <div className="fs-checkbox-wrapper"> <input className="fs-checkbox" id="courses-e-102" name="courses" required type="checkbox" value="e-102" /> </div> <div> <label className="fs-label" htmlFor="courses-e-102"> English 102 </label> </div> </div> <div className="fs-checkbox-field"> <div className="fs-checkbox-wrapper"> <input className="fs-checkbox" id="courses-h-101" name="courses" required type="checkbox" value="h-101" /> </div> <div> <label className="fs-label" htmlFor="courses-h-101"> History 101 </label> </div> </div> <div className="fs-checkbox-field"> <div className="fs-checkbox-wrapper"> <input className="fs-checkbox" id="courses-h-102" name="courses" required type="checkbox" value="h-102" /> </div> <div> <label className="fs-label" htmlFor="courses-h-102"> History 102 </label> </div> </div> <div className="fs-checkbox-field"> <div className="fs-checkbox-wrapper"> <input className="fs-checkbox" id="courses-em-1" name="courses" required type="checkbox" value="em-1" /> </div> <div> <label className="fs-label" htmlFor="courses-em-1"> Engineering Maths 1 </label> </div> </div> <div className="fs-checkbox-field"> <div className="fs-checkbox-wrapper"> <input className="fs-checkbox" id="courses-em-2" name="courses" required type="checkbox" value="em-2" /> </div> <div> <label className="fs-label" htmlFor="courses-em-2"> Engineering Maths 2 </label> </div> </div> </div> </div> <div className="fs-field"> <label className="fs-label" htmlFor="comments"> Additional comments </label> <textarea className="fs-textarea" id="comments" name="comments" /> </div> <div class="fs-button-group"> <button className="fs-button" type="submit"> Submit </button> </div> </form> ); } Show more
CSS CSS Copy Copy
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"); /** Variables **/ :root { --color-background: #cbd5e1; --color-background-alt: #3a9092; --color-border-active: #23494c; --color-border-default: #94a3b8; --color-highlight: #7ecac7; --color-primary: #23494c; --color-primary-active: #122d30; --color-text-default: #0f172a; --color-text-muted: #475569; --font-family-body: "Inter", sans-serif; } /** Base **/ *, ::before, ::after { box-sizing: border-box; } * { border: 0; margin: 0; padding: 0; } body { -webkit-font-smoothing: antialiased; font-family: var(--font-family-body); font-optical-sizing: auto; font-style: normal; } button, input, optgroup, select, textarea { font-family: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-size: 100%; font-weight: inherit; line-height: inherit; color: inherit; margin: 0; padding: 0; } [type="checkbox"], [type="radio"], [type="range"] { appearance: none; flex-shrink: 0; padding: 0; user-select: none; } [type="checkbox"]:focus, [type="radio"]:focus, [type="range"]:focus { outline: none; } /** Components **/ .fs-form { display: grid; row-gap: 1rem; } .fs-form:where(.fs-layout__2-column) { column-gap: 0.75rem; grid-template-columns: 1fr 1fr; } fieldset { display: grid; row-gap: 1rem; } .fs-form:where(.fs-layout__2-column) fieldset { column-gap: 0.75rem; grid-template-columns: 1fr 1fr; grid-column: 1 / -1; } .fs-field { display: flex; flex-direction: column; row-gap: 0.375rem; } .fs-label { color: var(--color-text-default); display: block; font-family: var(--font-family-display); font-size: 0.875rem; font-weight: 500; line-height: 1.25rem; } .fs-description { color: var(--color-text-muted); display: block; font-size: 0.875rem; line-height: 1.25rem; } .fs-button-group { display: flex; flex-direction: row-reverse; column-gap: 0.75rem; } .fs-form:where(.fs-layout__2-column) .fs-button-group { grid-column: 1 / -1; } .fs-button { background-color: var(--color-primary); border-radius: 0.375rem; color: white; cursor: pointer; font-size: 0.875rem; font-weight: 500; line-height: 1rem; padding: 1rem 2rem; transition-duration: 200ms; transition-property: background-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); } .fs-button:hover { background-color: var(--color-primary-active); } .fs-button:focus-visible { background-color: var(--color-primary-active); outline: 3px solid var(--color-highlight); } .fs-input, .fs-select { appearance: none; border-radius: 0.375rem; border-width: 0; box-shadow: var(--color-border-default) 0 0 0 1px inset; color: var(--color-primary); font-size: 0.875rem; height: 2rem; line-height: 1.25rem; outline: none; padding-left: 0.75rem; padding-right: 0.75rem; } .fs-input:focus-visible, .fs-select:focus-visible { box-shadow: var(--color-border-active) 0 0 0 1.5px inset; outline: 3px solid var(--color-highlight); outline-offset: 0; } .fs-input::placeholder { color: var(--color-text-muted); } .fs-checkbox-group, .fs-radio-group { display: flex; flex-direction: column; row-gap: 0.5rem; } .fs-checkbox-field, .fs-radio-field { column-gap: 0.5rem; display: flex; } :is(.fs-checkbox-field, .fs-radio-field) .fs-label + .fs-description { margin-top: 0.125rem; } .fs-checkbox-wrapper, .fs-radio-wrapper { align-items: center; display: flex; height: 1.25rem; } .fs-checkbox, .fs-radio { background-color: #fff; border: 1px solid var(--color-primary); height: 1rem; width: 1rem; } .fs-checkbox { border-radius: 0.25rem; } .fs-radio { border-radius: 100%; } .fs-checkbox:checked, .fs-radio:checked { background-color: var(--color-primary); background-position: center; background-repeat: no-repeat; background-size: 100% 100%; border-color: transparent; } .fs-checkbox:checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); } .fs-radio:checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); } .fs-checkbox:focus-visible, .fs-radio:focus-visible { outline: 3px solid var(--color-highlight); outline-offset: 0; } .fs-select { background-color: #fff; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); background-position: right 0.5rem center; background-repeat: no-repeat; background-size: 1.5em 1.5em; padding-right: 2.5rem; } .fs-slider { background: transparent; cursor: pointer; height: 1.25rem; width: 100%; } .fs-slider::-moz-range-track { background-color: var(--color-background); border-radius: 0.5rem; height: 0.5rem; } .fs-slider::-webkit-slider-runnable-track { background-color: var(--color-background); border-radius: 0.5rem; height: 0.5rem; } .fs-slider::-moz-range-thumb { background-color: var(--color-primary); border: none; /* Removes extra border that FF applies */ border-radius: 50%; height: 1.25rem; width: 1.25rem; } .fs-slider::-webkit-slider-thumb { appearance: none; background-color: var(--color-primary); border-radius: 50%; height: 1.25rem; margin-top: -0.375rem; /* Centers thumb on the track */ width: 1.25rem; } .fs-slider:focus-visible::-moz-range-thumb { outline: 2px solid var(--color-primary); outline-offset: 2px; } .fs-slider:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--color-primary); outline-offset: 2px; } .fs-switch-field { align-items: center; column-gap: 0.75rem; display: flex; justify-content: space-between; } .fs-switch { background-color: var(--color-background-alt); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='white'/%3e%3c/svg%3e"); background-position: left center; background-repeat: no-repeat; border-radius: 1.5rem; cursor: pointer; height: 1.5rem; transition-duration: 200ms; transition-property: background-color, background-position; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); width: 2.75rem; } .fs-switch:checked { background-color: var(--color-primary); background-position: right center; } .fs-switch:focus-visible { outline: 3px solid var(--color-highlight); outline-offset: 0; } .fs-textarea { appearance: none; border-radius: 0.375rem; border-width: 0; box-shadow: var(--color-border-default) 0 0 0 1px inset; color: var(--color-primary); font-size: 0.875rem; line-height: 1.25rem; outline: none; padding: 0.5rem 0.75rem; resize: vertical; } .fs-textarea:focus-visible { box-shadow: var(--color-border-active) 0 0 0 1.5px inset; outline: 3px solid var(--color-highlight); outline-offset: 0; } .fs-textarea::placeholder { color: var(--color-text-muted); } Show more
        
HTML React/Tailwind Copy Copy
// Make sure to run npm install @formspree/react // For more help visit https://formspr.ee/react-help import React from "react"; import { useForm, ValidationError } from "@formspree/react"; export function ExampleForm() { const [state, handleSubmit] = useForm("FORM_ID"); if (state.succeeded) { return <p>Thanks for joining!</p>; } return ( <form className="grid grid-cols-2 gap-x-3 gap-y-4" onSubmit={handleSubmit}> <div className="flex flex-col gap-y-1.5"> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="name" > Full Name </label> <input className="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="name" name="name" required /> </div> <div className="flex flex-col gap-y-1.5"> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="email" > Student Email </label> <input className="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="email" name="email" required /> </div> <div className="flex flex-col gap-y-1.5"> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="gender" > Gender </label> <input className="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="gender" name="gender" required /> </div> <div className="flex flex-col gap-y-1.5"> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="phone" > Phone Number </label> <input className="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="phone" name="phone" placeholder="(000) 000-0000" required /> </div> <fieldset> <div className="flex flex-col gap-y-1.5"> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="address-1" > Address line 1 </label> <input className="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="address-1" name="address-1" /> </div> <div className="flex flex-col gap-y-1.5"> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="address-2" > Address line 2 </label> <input className="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="address-2" name="address-2" /> </div> <div className="flex flex-col gap-y-1.5"> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="city" > City </label> <input className="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="city" name="city" /> </div> <div className="flex flex-col gap-y-1.5"> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="state" > State / Province </label> <input className="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="state" name="state" /> </div> <div className="flex flex-col gap-y-1.5"> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="zip-code" > Postal / Zip Code </label> <input className="h-8 appearance-none rounded-md border-0 px-3 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="zip-code" name="zip-code" /> </div> </fieldset> <div className="flex flex-col gap-y-1.5"> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]"> Please select the courses you wish to enrol for </label> <div className="flex flex-col gap-y-2"> <div className="flex gap-x-2"> <div className="flex h-5 items-center"> <input className="checked:bg-checkbox-checked h-4 w-4 rounded border border-solid border-[--color-primary] bg-white checked:border-transparent checked:bg-[--color-primary] checked:bg-[size:100%_100%] checked:bg-center checked:bg-no-repeat focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight]" id="courses-cs-101" name="courses" required type="checkbox" value="cs-101" /> </div> <div> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="courses-cs-101" > Introduction to Computing </label> </div> </div> <div className="flex gap-x-2"> <div className="flex h-5 items-center"> <input className="checked:bg-checkbox-checked h-4 w-4 rounded border border-solid border-[--color-primary] bg-white checked:border-transparent checked:bg-[--color-primary] checked:bg-[size:100%_100%] checked:bg-center checked:bg-no-repeat focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight]" id="courses-e-101" name="courses" required type="checkbox" value="e-101" /> </div> <div> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="courses-e-101" > English 101 </label> </div> </div> <div className="flex gap-x-2"> <div className="flex h-5 items-center"> <input className="checked:bg-checkbox-checked h-4 w-4 rounded border border-solid border-[--color-primary] bg-white checked:border-transparent checked:bg-[--color-primary] checked:bg-[size:100%_100%] checked:bg-center checked:bg-no-repeat focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight]" id="courses-e-102" name="courses" required type="checkbox" value="e-102" /> </div> <div> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="courses-e-102" > English 102 </label> </div> </div> <div className="flex gap-x-2"> <div className="flex h-5 items-center"> <input className="checked:bg-checkbox-checked h-4 w-4 rounded border border-solid border-[--color-primary] bg-white checked:border-transparent checked:bg-[--color-primary] checked:bg-[size:100%_100%] checked:bg-center checked:bg-no-repeat focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight]" id="courses-h-101" name="courses" required type="checkbox" value="h-101" /> </div> <div> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="courses-h-101" > History 101 </label> </div> </div> <div className="flex gap-x-2"> <div className="flex h-5 items-center"> <input className="checked:bg-checkbox-checked h-4 w-4 rounded border border-solid border-[--color-primary] bg-white checked:border-transparent checked:bg-[--color-primary] checked:bg-[size:100%_100%] checked:bg-center checked:bg-no-repeat focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight]" id="courses-h-102" name="courses" required type="checkbox" value="h-102" /> </div> <div> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="courses-h-102" > History 102 </label> </div> </div> <div className="flex gap-x-2"> <div className="flex h-5 items-center"> <input className="checked:bg-checkbox-checked h-4 w-4 rounded border border-solid border-[--color-primary] bg-white checked:border-transparent checked:bg-[--color-primary] checked:bg-[size:100%_100%] checked:bg-center checked:bg-no-repeat focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight]" id="courses-em-1" name="courses" required type="checkbox" value="em-1" /> </div> <div> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="courses-em-1" > Engineering Maths 1 </label> </div> </div> <div className="flex gap-x-2"> <div className="flex h-5 items-center"> <input className="checked:bg-checkbox-checked h-4 w-4 rounded border border-solid border-[--color-primary] bg-white checked:border-transparent checked:bg-[--color-primary] checked:bg-[size:100%_100%] checked:bg-center checked:bg-no-repeat focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight]" id="courses-em-2" name="courses" required type="checkbox" value="em-2" /> </div> <div> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="courses-em-2" > Engineering Maths 2 </label> </div> </div> </div> </div> <div className="flex flex-col gap-y-1.5"> <label className="block font-[family-name:--font-family-display] text-sm font-medium text-[--color-text-default]" htmlFor="comments" > Additional comments </label> <textarea className="resize-y appearance-none rounded-md border-0 px-3 py-2 text-sm text-[--color-text-default] outline-none ring-1 ring-inset ring-[--color-border-default] placeholder:text-[--color-text-muted] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-offset-0 focus-visible:outline-[--color-highlight] focus-visible:ring-[1.5px] focus-visible:ring-inset focus-visible:ring-[--color-border-active]" id="comments" name="comments" /> </div> <div class="col-span-full flex flex-row-reverse gap-x-3"> <button className="cursor-pointer rounded-md bg-[--color-primary] px-8 py-4 text-sm font-medium leading-4 text-white transition-colors duration-200 hover:bg-[--color-primary-active] focus-visible:bg-[--color-primary-active] focus-visible:outline focus-visible:outline-[3px] focus-visible:outline-[--color-highlight]" type="submit" > Submit </button> </div> </form> ); } Show more
CSS CSS Copy Copy
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"); @tailwind base; @tailwind components; @tailwind utilities; @layer base { :root { --color-background: #cbd5e1; --color-background-alt: #3a9092; --color-border-active: #23494c; --color-border-default: #94a3b8; --color-highlight: #7ecac7; --color-primary: #23494c; --color-primary-active: #122d30; --color-text-default: #0f172a; --color-text-muted: #475569; --font-family-body: "Inter", sans-serif; } *, ::before, ::after { box-sizing: border-box; } * { border: 0; margin: 0; padding: 0; } body { -webkit-font-smoothing: antialiased; font-family: var(--font-family-body); font-optical-sizing: auto; font-style: normal; } button, input, optgroup, select, textarea { font-family: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-size: 100%; font-weight: inherit; line-height: inherit; color: inherit; margin: 0; padding: 0; } [type="checkbox"], [type="radio"], [type="range"] { appearance: none; flex-shrink: 0; padding: 0; user-select: none; } [type="checkbox"]:focus, [type="radio"]:focus, [type="range"]:focus { outline: none; } } @layer components { .fs-slider { background: transparent; cursor: pointer; height: 1.25rem; width: 100%; } .fs-slider::-moz-range-track { background-color: var(--color-background); border-radius: 0.5rem; height: 0.5rem; } .fs-slider::-webkit-slider-runnable-track { background-color: var(--color-background); border-radius: 0.5rem; height: 0.5rem; } .fs-slider::-moz-range-thumb { background-color: var(--color-primary); border: none; /* Removes extra border that FF applies */ border-radius: 50%; height: 1.25rem; width: 1.25rem; } .fs-slider::-webkit-slider-thumb { appearance: none; background-color: var(--color-primary); border-radius: 50%; height: 1.25rem; margin-top: -0.375rem; /* Centers thumb on the track */ width: 1.25rem; } .fs-slider:focus-visible::-moz-range-thumb { outline: 2px solid var(--color-primary); outline-offset: 2px; } .fs-slider:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--color-primary); outline-offset: 2px; } } @layer utilities { .bg-caret-down { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); } .bg-checkbox-checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); } .bg-radio-checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); } .bg-switch-thumb { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='white'/%3e%3c/svg%3e"); } } Show more

How to use this form

Get started in just a few steps.

  1. Create a form on Formspree

    Create a free account and choose New Form.

  2. Add actions and validation rules

    Choose from our growing list of actions, from Airtable to Zendesk and everything in between.

  3. Update your form's action

    Replace with the form endpoint in the code above with the ID from your new form.
    <form action="https://formspree.io/f/{form_id}" method="post">

  4. Tweak your form's code

    Don’t forget to include a name attribute for every input.

  5. Deploy your form to your hosting platform

    Formspree works great with static websites, but also plays nicely with many hosting platforms like Shopify, Webflow and more. See the guides below.

Integration Guides

Contact forms that work out of the box with top website platforms.

GitBook

GitBook

Adding a form to GitBook

Shopify

Shopify

Adding a form to Shopify

Gatsby

Gatsby

React Forms with Gatsby

Eleventy

Eleventy

HTML Forms with Eleventy

Jekyll

Jekyll

HTML Forms with Jekyll

NextJS

NextJS

React Forms with NextJS

What is a Course Enrollment Form?

A course enrollment form is designed to collect information from students or participants who wish to register for a course, class, or training program. This form typically asks for the participant’s name, contact information, and sometimes additional details like previous experience or preferred course dates. A course enrollment form is ideal for educational institutions, training centers, or independent instructors looking to organize enrollments efficiently and keep track of participant details. By having a dedicated enrollment form, organizations can streamline the registration process, reduce administrative workload, and ensure accurate data collection for each course offering.

Formspree offers a ready-to-use course enrollment form template that can be customized to fit your program’s unique requirements. With Formspree, you can add this form to your website easily, allowing students to register quickly while you receive notifications for each new enrollment. Formspree’s email and data handling capabilities let you securely manage registrations and keep students’ information organized and accessible for further communication, creating a smooth enrollment experience for all.

FAQ

  • What is a registration form?

    A registration form is an online form that collects necessary information from users to register for events, services, or memberships. It often includes fields like name, email, and other details, depending on the purpose, streamlining the sign-up process and capturing data for further engagement.

  • When are registration forms needed?

    Registration forms are essential when collecting user information for events, memberships, courses, or service access. They provide a structured way to onboard users, allowing organizers or businesses to gather details needed to manage sign-ups and ensure smooth entry or access.

  • What are the subtypes of registration forms?

    Common subtypes of registration forms include event registration forms, account creation forms, membership sign-ups, and service registration forms. Each subtype gathers specific information suited to its purpose, ensuring the form aligns with the user’s intent and the organization’s needs.

  • What industries predominantly use registration forms?

    Industries such as education, healthcare, events, e-commerce, and hospitality predominantly use registration forms. These sectors benefit from organized data collection, helping manage sign-ups, patient registrations, customer accounts, and membership tracking efficiently.

  • How can users receive email notifications upon registration?

    With Formspree as the backend, users can easily set up email notifications for each registration form submission. This feature allows designated individuals to receive real-time email alerts and instantly view responses on the Formspree dashboard, ensuring timely follow-ups and engagement.

  • Can registration forms collect payments?

    Yes, registration forms can be connected to payment processors like Stripe to securely handle payments alongside user registration. This capability enables businesses to collect fees, event tickets, or donations directly through the form, simplifying the payment and registration process.

  • Are the form templates free to use?

    Yes, all registration form templates on this website are free to use and customizable to meet various needs. Formspree provides a range of templates that you can embed on your website, making it easy to manage sign-ups without additional costs.

More registration Forms