This is a solution to the Multi-step form challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- Complete each step of the sequence
- See a summary of their selections on the final step and confirm their order
- View the optimal layout for the interface depending on their device's screen size
- See hover and focus states for all interactive elements on the page
- Solution URL: Frontend Mentor Solution Page
- Live Site URL: https://multi-step-form-victory.vercel.app
- Semantic HTML5 markup
- SCSS
- Flexbox
- Mobile-first workflow
- Gulp
- Tailwind CSS - For styles
I learnt alot about JS event handlers and some crazy DOM manipulations Like this code I used to render prices on add-ons on the finishing page (there's more to it this is just a snippet haha)
let updateAddOnPriceUI = () => {
let selectedAdOnsIndexs = addOnsQuery.multiIndexOf(addOnsQuery, true)
let html = ``
for (let i = 0; i < selectedAdOnsIndexs.length; i++) {
if (yearlySelected) {
html += `<p>+$${addOnsYearly[selectedAdOnsIndexs[i]]}/yr</p>
`
allPrices.push(addOnsYearly[selectedAdOnsIndexs[i]])
} else {
html += `<p>+$${addOnsMonthly[selectedAdOnsIndexs[i]]}/mo</p>
`
allPrices.push(addOnsMonthly[selectedAdOnsIndexs[i]])
}
}
return html
}
I want to learn other ways I can write code to be short and readable at the same time too
- Stack Overflow - Used it so much and it helped me see that I can create an 'Array.protoype custom function' as I saw from someone. I really liked this pattern and will use it going forward.
- Frontend Mentor - @Nnadivictory25
- Twitter - @nnvictory001
I want thank me for not giving up when I meet bugs :)