Design comparison
Solution retrospective
Hi ! I have one issue, when i click on the submit button, it doesnt redirect me to the thank page.. I can't find the issue in the JS file, anyone can help on this ? Thanks !
Community feedback
- @DLee1993Posted 12 months ago
I'm not a 100% but i think you need to add the method "get" to the form and that will send the form data through the url and then you can get the data in js, please look into these resources for a basic explanation of how to send the data and then retrieve it in js :)
GET Method -https://www.w3schools.com/tags/att_form_method.asp#:~:text=The%20form%2Ddata%20can%20be,is%20limited%20(about%203000%20characters)
Get data from url - https://sentry.io/answers/how-to-get-values-from-urls-in-javascript/
Once you can retrieve the data, all you then need to do is append that data to the email element on the thank you page :)
Marked as helpful0 - @DLee1993Posted 12 months ago
Hey,
I believe your issue is as follows,
You currently do not have a url attached to the form for a redirect, please try the following and see if that works
<form action="thank.html" method="POST">also, don't forget to add a link instead of a button to the thank you page ( dismiss message button ) so the user can redirect back to index
Marked as helpful0@JulienLachPosted 12 months ago@DLee1993
It works ! i just added "<form action="./thank.html">. Because a got a 405 error if i set the method POST.
Thanks man :)
1@JulienLachPosted 12 months ago@DLee1993
And aslo changed to dismiss button, what about trying to display the email input in the span in the thank page ? Lets go !
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