Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Creates Google Forms URL containing answers that have been filled
// A teacher told us to submit the same form multiple times as sort of memory strengthening.
// I don't like that though, so here's a script that creates a Forms URL that contains the answers I've already filled.
location.origin + location.pathname + '?' +
Array.from(document.querySelectorAll('input[name^="entry."]'))
.filter((el) => el.value)
.map((el) => `${el.name}=${encodeURIComponent(el.value)}`)
.join('&');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment