If you were to use single typeform, it can autosave progress and preserve their answers even when they leave the form.
If you want to split the user journey between multiple typeforms you will need to take care of preserving their session yourself. If the data is not sensitive, the simplest solution might be saving the data in a cookie. Each page with a typeform could save the data from query parameters info a cookie. When users returns to the page later, it could load the data from cookie as a fallback solution when query parameters are not available. You will need to pass those values to embedded form via embed SDK yourself.
User journey:
- page1
- form 1 will redirect to page 2 and pass hidden fields as query string params
- page 2
- custom JavaScript will load the values from query string
- store the values in cookies
- pass those values as hidden fields to form 2
- display form 2
- form 2 will redirect to page 3 and pass hidden fields as query string params
- page 3
If user returns to a page later, eg page 2:
- custom JavaScript will try to read the values from query string (but it will be empty)
- read the values from cookies instead
- pass those values as hidden fields to form 2
- display form 2
- …
The JavaScript code could look like this:
function getHiddenFields() {
let { search } = window.location;
if (search) {
document.cookie = `hidden=${JSON.stringify(search)};`;
} else {
const match = document.cookie.match(/hidden=([^;]+)/);
if (match && match[1]) {
search = JSON.parse(match[1]);
}
}
const params = new URLSearchParams(search);
return {
foo: params.get("foo"),
bar: params.get("bar"),
};
}
window.tf.createWidget("Cqrg7cgL", {
container: document.querySelector("#form"),
hidden: getHiddenFields(),
});
You can find a full working example here:
https://glitch.com/edit/#!/luxurious-mulberry-occupation