Design comparison
Solution retrospective
How do you allow the user to submit their own tip amount?
I ended up removing that part for this first iteration but I would love to see how others have tackled this.
Community feedback
- @MavreonPosted about 2 years ago
Hello Roy, congratulations on completing this challenge 🎉 Concerning your question, that's simple, you'd use an input tag/element to get a custom value for the tip and then calculate accordingly when the calculate button is clicked. You can reference my solution to this challenge, here is a link to my solution. Happy Coding 😊
Marked as helpful0@roysaucedoPosted about 2 years ago@Mavreon Thanks for the feedback! I am going to add that now
0 - @DonUggioniPosted about 2 years ago
Hey Roy,
Congratulations on finishing this project!
Regarding your question, you can add an input field for the custom tip and then add an eventListener to it to retrieve the value and use the custom value instead of the other preset values.
Feel free to have a look at my solution for this challenge to have an idea!
Hope it helps!
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord