A simple website with 5 input fields divided over 3 tabs + a FAQ. It must work good on both mobile (force portrait mode) and desktop, but mobile is most important.
Use standard jQuery and Bootstrap 4 to build the site. If you want to use any additional libraries, please ask before you start using it.
I will set up a git repo for this project on bitbucket and I will divide the specification under into issues for you to solve.
The page consist of 5 parts:
1 Header: Logo (text), sticky (so does not disappear when user is scrolling)
2 Banner ad: The ad is also sticky
3 Form fields: A title and 5 text fields divided over 3 tabs.
3.1 Tab 1: 3 form fields.
3.1.1 Field "Name", must contain minimum 2 names and have at least 4 characters in total (2 chars for first name, space and 1 char for the last name)
3.1.2 Field "Born", optional, but if it contains anything it must contain a year in the range 1900 and 2001. We will not use a drop-down, people must enter 4 digits.
3.1.3 Field "Place", optional, autocomplete. When people start to type, suggest first 3 hits from a predefined list of places.
3.1.4 Show form errors, if they exist when the user clicks on Submit.
3.1.5 “Submit”-button, when clicked and no form errors, then go to next tab.
3.2 Tab 2: Subtitle "Verify Human”. If the user already has done this (let say he went back to the first tab to change the name), then skip this tab and go directly to tab 3.
3.2.1 Show one text of a list of text predefined.
3.2.2 Field "Type shown text". The user must type character by character the text shown above (small or large characters are considered the same). So it is illegal to copy paste the text, so just disable pasting of text for this field.
3.2.3 Show form error, if they exist when the user clicks on Submit.
3.2.4 “Submit”-button, when clicked and no form error, then go to next tab.
3.3 Tab 3: Show what is entered in the first 3 fields in tab 1 (comma separated on one line) + a link “Edit” that brings the user back to the first tab.
3.3.1 Field "Email". Must be a valid email address and not from a domain in a predefined list of banned domains (also: a subdomain is also banned if the top level domain is on the banned list).
3.3.2 Text regarding email restriction.
3.3.3 Show form errors, if they exist when user clicks on Submit.
3.3.4 “Submit”-button and redirect to a different domain.
4 FAQ. Below the form tabs are the FAQ.
4.1 Hide all questions except one.
4.2 If the url has hashtag then show the related question.
4.1 If no hashtag in the URL, show the first question.
4.2 If a question is clicked on do this:
4.2.1 Close all other questions
4.2.1 Show question
4.2.2 Add the hashtag for this question to the url (without reloading the page)
5 Footer: Some text
I might come with small additions or changes as I see needed (I might have forgotten something or I see something is not working quite the way I originally thought).