Share a quiz as a link and collect the scores
Claude and ChatGPT write quizzes as one HTML file. Sharing one is easy; getting each person's score back is where they break. Collect name, answers and score with one form attribute, and avoid the three mistakes that send blank scores.
Ask an AI tool for a quiz on a training topic, a product launch or a class reading and you get one HTML file with the questions, the answer key and a score at the end. Open it and it works. The score shows on the taker's screen and is gone when they close the tab.
Hosted on FileShare Pro, the same page can send each taker's name, answers and score back to you with no server and no code beyond one attribute.
Collect results with one attribute
Wrap the questions in a form and give it data-fsp-form: <form data-fsp-form="quiz">. On the share link, a helper script submits the form without a page reload and stores the row on your file. You read the rows in the document view and download them as CSV. Takers can submit; they cannot read anyone else's row.
Each response holds up to 10 fields of up to 500 characters each, 2 KB in total. A file collects up to 1,000 responses on Free and 10,000 on Pro and Team. Field names starting with an underscore are dropped, so use score, not _score.
Add data-fsp-thanks="Thanks, your score is saved." to replace the form with that line after a successful submit.
Score arrives blank
The usual AI pattern is a hidden <input name="score"> that the quiz fills inside its own submit handler. The helper reads the form when the submit starts, before the quiz's handler runs. Tested in Chrome with the helper script: the row arrived with "score":"" even though the page showed 1/1.
Keep the score field current as people answer instead. Update the hidden input in a change listener on the form, so it already holds the final score when Submit is pressed. Tested: the same quiz sent "score":"1/1".
An unanswered question is missing from the row
A radio group with nothing selected is left out of the form data entirely. Tested: with q3 unanswered, the row held name, q1, q2 and score, and no q3. Checkbox groups arrive as one comma-separated value, such as "red, blue".
Add the required attribute to one radio button in each group if every question must be answered, or treat a missing column in the CSV as "skipped".
Error "Cannot read properties of undefined (reading 'submit')"
The helper also exposes window.fsp.submit(form, data) for quizzes that build their own result screen. It exists only on the share link, and it is added at the end of the page, after your own scripts. Tested: typeof window.fsp was "undefined" in a script at the top of the body and "object" by DOMContentLoaded. Opened from your disk it is always undefined.
Call window.fsp.submit inside the button's click handler, not at load time, and guard it: if (window.fsp) window.fsp.submit("quiz", { name, score }). The quiz then still works when you test it locally.
Upload it and send the link
Drag the HTML file onto the FileShare Pro dashboard and copy the link. Takers need no account. Responses are on by default for HTML files; the share dialog has a checkbox, "Let forms on the page collect responses", to turn them off.
The answer key sits in the page source, and anyone who opens developer tools can read it. That is fine for practice and training checks; do not use a hosted HTML file for a graded exam.
To fix a question after people have started, upload the new file over the old one; the link and the responses collected so far stay: updating a shared link without changing it.
Related: a feedback form with no backend, sharing an HTML game as a link and why a page that works in chat breaks when hosted.
Frequently asked
Yes, for one question. Add data-fsp-poll="q1" to the form and put an element with data-fsp-results="q1" data-fsp-form="quiz" on the page (without data-fsp-form it reads the form named "default" and shows no responses); it shows the count and percentage for each answer. The rows themselves stay visible only to you and the people you share the file with.
Only loosely. A quiz can save a flag in localStorage and hide the form on a second visit, but that is per browser and clearing site data removes it. Ask for a name or email field and remove duplicates in the CSV.
Anyone with the link can open it. Password-protected links are on Pro, and responses on a protected page are accepted only from people who opened it through the link: password-protecting an HTML page.
Drop the file, copy the link — live in seconds, free plan included.
Start sharing free