| Changelog | FormVox 1.6 is here. Notably faster at any size, because responses now live in the Nextcloud database instead of the form file. A PDF of every response, and permissions that follow Nextcloud's own throughout. Plus a public link that never hands out more than it should, and a new icon.
Upgrade notes
Read these before you update: 1.6 keeps responses in the database, and is stricter than 1.5 in a few places.
- Responses move into the database by themselves. A background job moves existing forms in after the update, largest first, and any save, submission or settings change moves a form the moment it is touched. Nothing to do, but occ formvox:migrate moves everything now instead of waiting, --status shows what is left, and --file-id=<id> moves one form.
- Restart PHP before occ formvox:migrate. After an update through occ, restart PHP, or wait a minute, before you run occ formvox:migrate: until then PHP can still run the code of the version before.
- Background jobs need system cron. PDFs, confirmation emails, webhooks and the move into the database run as background jobs. With AJAX cron they wait until someone opens Nextcloud; set background jobs to Cron.
- Back up the database and app data too. A form's responses, its secrets (link, password, API keys, webhooks) and its uploads, branding images, ODT template and PDFs are no longer only in the .fvform file. Back up all three together with your files, or a files-only backup is missing the responses.
- No way back without that backup. Once a form has moved in, its file no longer holds the responses. Putting the 1.5 code back without restoring the backup from before the update first answers 503 for the whole instance, and then shows empty forms.
- What is kept for 30 days. A form whose file merely disappeared (removed on disk, a restore without it), and the forms of a deleted team folder, keep their responses for 30 days: occ formvox:orphans lists them and removes one at once. The forms in a deleted account's home, its trash included, lose their responses, uploads and PDFs when the account is deleted.
- Not covered by Nextcloud's server-side encryption. That encryption protects files; it does not reach the database or app data, so responses, secrets and respondents' uploads are not covered by it even when it is on. occ encryption:encrypt-all and decrypt-all leave them untouched.
- A busy form answers 503. A form that is being saved answers 503 with Retry-After (reason busy) and the browser tries again on its own. It used to answer 409, and on the public side sometimes "Form not found". Check integrations that expected 409.
- The external API and the results page can be paged. Ask for limit (up to 1000) and after, and the answer carries next. Without those parameters both behave as before.
- Every error has the same shape, {"error": "…", "reason": "…"}, with a fixed reason that does not change with language. Several status codes now match their cause: a file that is not a FormVox form answers 422 with reason broken_form instead of a server error; the external API documentation lists them all.
- API keys and webhooks work within their creator's rights. Reading responses, also as a PDF, needs that the API key's creator may still download the form; a key whose creator lost that right gets 401. A webhook is sent only while its creator may: check who created your webhooks.
- PDFs in the API and webhooks. GET /forms/{fileId}/responses/{responseId}/pdf returns a response's PDF. The response.created and response.updated webhooks carry a pdf block with url, sha256, size and filename (never the PDF itself), plus pdf.status and pdf.generated_at. The sha256 always matches what the API gives.
- When there is no PDF. A webhook waits until its PDF is made and, after three tries, goes with "pdf": null when the PDF cannot be kept, so the response itself always arrives. A deletion carries "pdf": null too, and so does every event of a form that does not keep PDFs. On such a form the PDF route answers 409 with reason pdf_disabled, and before the background job has made a PDF it answers 409 with reason pdf_not_ready.
- PDFs from the moment you turn them on. Keep a PDF of every response is off by default, per form. Every response that comes in after you turn it on gets its PDF; earlier responses, including all responses from before the update, get none, and the PDF route answers 409 with reason pdf_not_ready for them.
- Which answers applied, and which event. Webhooks and the API now say which answers applied: applicable_answers holds the answers to the questions the respondent was shown, and not_applicable names the questions that did not apply. A webhook carries its event id as event_id, and names its form by form.fileId, the id the API knows it by, and by form.id.
- Dates and numbers are checked for what they are. A date must be a real day, a date-time a real moment, and a number, scale or rating answer a finite number of at most 64 characters (1e400 is refused). The form always sent these; an API call with anything else now gets 400 with reason invalid_answer.
New: a PDF of every response
- Keep a PDF of every response. A new switch in the share dialog, under the confirmation email, off by default. Turn it on and every submission gets its PDF right away, to download from the results. Leave it off and the form has no PDFs anywhere: not in the results, the API, the webhooks or the confirmation email.
- The form as the respondent saw it. The pages they went through and only the questions they were shown, with earlier answers filled in where the form refers to them, in their language and time zone, with your instance's theming and the form's description.
- Who filled it in, on every page. The PDF names who filled in the form, "Anonymous", or the API key that sent it. Every page carries the response id and "Page 1 of 3", so a loose printed page can be found again.
- Made once, kept as long as the response exists. It stays the same document when the form changes later. A changed response gets a new PDF, and a deleted response's PDF goes with it.
- One name, everywhere. A response's PDF is named after the form, the day it was sent and the response id: in a download, the API, the ZIP, the email and the webhook.
- Export every response at once. Export PDFs (ZIP) builds them in the background. For a form with many responses the ZIP holds what is ready and says how many are still on the way, and it ends with a manifest of every response and its PDF.
- Email it to the respondent. Turn on Attach a PDF of the response under the confirmation email. A signed-in respondent's confirmation, PDF included, goes to their account's e-mail address, and the form says so under the e-mail question. Anonymous respondents get the PDF only where the administrator allows it, with a daily limit per address and an hourly limit per form. A PDF larger than 8 MiB, or one that could not be sent three times, stays behind and the confirmation goes without it.
- Built for integrations. The external API and the webhooks carry the PDF alongside the response, with the answers that applied. The details are in the Upgrade notes.
- Long answers, no problem. A response full of text or line breaks no longer stops PDFs from being made, and a table keeps equal columns however long one cell is. An answer shortened in the PDF says so. The theming logo is scaled down once for the header.
- A PDF that cannot be made says so in the app, instead of leaving the results page for an error.
This feature was funded by the Landesinstitut für Schulqualität und Lehrerbildung Sachsen-Anhalt (LISA), which asked for it. Like the rest of FormVox, it is open source and available to every user.
Faster, at any size
- Responses live in the database. Each one is stored in a short step of its own, instead of the whole form file being rewritten for every submission.
- A busy form takes many submissions at once.* Up to 46% more submissions saved per second under heavy load, with no server errors.
- Noticeably lighter under load.* Up to a third less server work per submission, and more than a quarter less when filling in signed in.
- The editor opens about 3× faster** on a form with many responses, and needs much less memory per request.
- Large forms load and export in pages.** The results page shows the newest responses first and loads more as you scroll. Exports and the PDF ZIP stream through a large form's responses instead of holding them all in memory.
- A busy form is a moment's wait, not an error. The form page, submissions, uploads, the external API and the editor all keep working while a form is being saved, and a browser that meets a busy form tries again on its own. Integrations: see the Upgrade notes.
- Respondents never wait for webhooks, notifications or the confirmation email. They go out from a background job shortly after the submission, tried again for about an hour if a webhook or mail server fails.
- A submission is stored once, however often it arrives. A browser that retries after "busy" is answered with the response already stored, including on forms that take one response per person.
- Uploads are no longer limited to 50 an hour per address. The limit now counts per response, with a higher hourly ceiling per address.
- Existing forms move in without losing a thing.*** Responses, links, keys and uploads arrive intact, and a form file shrinks to a fraction of its size.
* Load test on a 1 vCPU test server (Nextcloud 35, MySQL), 200 respondents at once, three runs of 1,000 submissions: this version saved 8.9–9.7 a second against 6.4–6.6 for the previous version (+39–46%) and gave no server error, where the previous version repeatedly ran out of database connections ("Too many connections"). Server CPU time per stored response, from the first to the last submission: −28 to −33% at 200 at once, and −27 to −28% filling a form signed in, from 0 to 5,000 responses. A second test on a later build gave 8.8–9.1 a second and the same CPU per submission within the spread. The two versions differ in more than storage, so take the figures as a direction, not an exact number for your own server.
** A form with 5,180 responses on the same test server: the editor opened in 102 ms and sent 1.2 kB, against 368 ms and 1.8 MB, and at 20,180 responses it still took 112 ms. Times are as the client saw them, network included. PHP's peak memory per request was 14–25 MB instead of 35–41 MB; a request for everything at once still grows with the form, to 84 MB at 20,180 responses. Fetching those 20,180 responses in pages of 2,000, as the results page does, took 0.4 s for the first page and 2.6 s for all 11 (later build).
*** The 176 forms on the test server, 15,682 responses in all, moved in. Every response arrived with the same content (checked by hash), and the links, passwords, API keys, webhooks and uploads were the same afterwards. The form files shrank from 16.6 MB in total to 183 kB; three forms of 5,180 responses went from 5.2–5.5 MB to under 1 kB each. In a separate test the background job moved 1,200 small forms in three consecutive cron runs.
Permissions, the Nextcloud way
- One rule for everything. FormVox follows Nextcloud's own permissions, ACL included: in the app, on a public link, through the external API and in WebDAV.
- An API key works within its creator's rights. Reading responses, also as a PDF, needs that the key's creator may still download the form, as an export in the app does. A key whose creator lost that right stops working.
- A webhook too. It sends every response out, like an export, so it is made, redirected or sent only while its creator may download the form. The share dialog shows one that lost that right as inactive.
- Preview without download is respected. A share without download permission shows the responses and the results only where Nextcloud lets that person preview the file.
- Opening a public link, or dropping its password, takes full rights, whatever value a request sends.
- Taken away means taken away. The editor loses its editing rights the moment they are taken away.
Your data, safe
- A public link never hands out a form's responses or its own folders. Downloading a shared folder that holds a form no longer gives out the form file with its responses, and the folders a form keeps for its uploads, branding and PDFs do not exist for a public link.
- Old responses and secrets never come back. Restoring an old version, or putting a form file back over another, brings back only the form's content: questions, pages, settings. Its responses and secrets always stay where they are.
- Encrypting or decrypting all your files no longer touches a form's responses.
- A copy, or a
.fvform uploaded from outside, always starts empty: no responses, link or keys, whatever the file carries.
- Deleting a response deletes its uploaded files too, instead of leaving them in a trash nobody checks.
- Deleting a form for good deletes its responses too. When a form is removed from the trash, or the trash is emptied, its responses, uploads, PDFs and keys are gone right away, in a personal folder and in a team folder alike. A form in the trash keeps everything and comes back complete.
- The PDFs of responses, and branding images, open only from Nextcloud's own pages, never from a link elsewhere.
- The link password is protected against guessing everywhere, and a new password or link signs every visitor out.
- Hidden means not stored. A question hidden by a condition, or on a page that routing skips, is never required and its answer is never stored, also through the external API. This is enforced on the server, not only in the browser.
- A second tab can no longer overwrite newer changes. The editor checks the version it last saw before saving, and offers to reload on a conflict.
A look of its own
- A form has its own icon in Files. A purple clipboard, in the list and grid, search, shares and the New menu, on light and dark themes. Its thumbnail no longer reads the form, so it is lighter on every save.
Clearer wording
- American spelling throughout, as Nextcloud's own: "license", "organization".
- Accounts, as in Nextcloud. "Accounts" where Nextcloud says accounts, and labels in sentence case.
- Plurals that read right in every language: "1 option", "3 options".
- Every translation carries over to the new wording: Dutch, German, French, Catalan and Ukrainian.
Fixed
- New responses notify the form's creator, also in a Team Folder. A form in a Team Folder notified an arbitrary member of the folder, and which one could change on its own (#146).
- Formal German shows FormVox in German. An instance or account set to "Deutsch (Förmlich: Sie)" saw FormVox, and the PDFs made in the background or through the API, in English.
- Public links work for forms in an S3 home folder or an older Team Folder.
- Forms in a team folder work whatever the data directory's path, also a long one, as in a snap install.
- A form that is not open yet shows the time in a readable time zone, not bare UTC.
- A date question's first and last allowed day are the days the creator picked. East of UTC they were stored a day early; an existing form keeps its limits until the question is saved again.
- A number too large to hold no longer breaks the results summary.
- A full quota never cuts a form off mid-write. Nextcloud's silent truncation on a full quota is now caught and undone.
- Forms open from Files again on every supported Nextcloud (32 to 35).
- A form moved to a team folder or external storage keeps its uploads, branding images and templates.
- Quick edits no longer stop the editor with "changed elsewhere".
- Forms no longer vanish from the list while responses come in, and a settings save no longer drops its settings silently when the form was busy.
- Long titles and file names in other scripts no longer break forms, uploads or exports.
- Exports download with any title. Their file names are plain letters now; on Nextcloud 35 a title with "½" or "÷" made every download fail.
- Answer checks and the confirmation email are translated in Dutch, German, French, Catalan and Ukrainian.
<hr /> |