0
I have an app that has two screens, html register. and html.. In the html register. have a checkbox for the user to accept the terms, can only register if you accept, but is not required to open the Terms screen. But if it opens, there will be at the end of the text two buttons, accept and turn down. Let’s say he said yes, then turn to the page html register. with the checkbox already selected, but loses all the input data he had already filled in.
My question is: how do I not lose this data when it clicks on html. and then redirect to html register.?
there are some possibilities. 1 - You can save the data to a localStorage and then retrieve it. 2 - Open the terms in another tab, use (look for target _Blank) 3 - Open terms in a modal and this way it would not leave the page.
– Lucas Brogni
As Lucas said, open the term in a modal.
– LeAndrade
I had already thought of a modal, but I wanted to know if it would have as in other ways.
– user118030
I agree with what his friends said. I think the separation into two pages generates an unnecessary work of having to store the information of the acceptance of the terms. But for information, using only javascript and html, only with localStorage or via URL parameter you could achieve this result. But none of them I would recommend.
– Joao Paulo
Or cookie... but not recommend
– Leandro Angelo
It would not be the case to use
sessionStorage
?– Wallace Maxters
Possible duplicate of: 1. https://answall.com/q/67219/3635 - 2. https://answall.com/q/424/3635 - 3. https://answall.com/q/116395/3635 - 4. https://answall.com/q/75557/3635 - 5. https://answall.com/q/109935/3635
– Guilherme Nascimento
What have you ever tried to do?
– Wallace Maxters