Form Builders
Almost every question SeqDesk asks a researcher is configurable. Three separate builders own three separate forms:
| Builder | Screen | Governs |
|---|---|---|
| Sequencing Order Form | /admin/form-builder | The intake wizard at /orders/new and the sample table inside a sequencing order |
| Study Forms / Define Studies | /admin/study-form-builder, or /admin/study-definitions when the dynamic-studies module is on | The study questionnaire |
| Sequencing Run Fields | /admin/sequencing-run-form-builder | The per-sample questionnaire on a sequencing run’s assignment table |
They share the same field model — type, label, visibility, required, help text, validation — but they are stored separately and edited separately. Nothing you do in one affects the others.
The order and study builders autosave. Roughly 1.2 seconds after you stop editing, the configuration is written and becomes live for researchers; the header shows Unsaved changes, then Saving changes…, then the saved state. There is no “publish” step and no draft mode. Export the current configuration before a large restructuring — that export is your only rollback.
Sequencing Order Form Builder
Five tabs across the top of /admin/form-builder:
| Tab | Contents |
|---|---|
| Per-Sequencing Order Fields | Questions answered once per order, plus suggested field templates |
| Per-Sample | Questions answered for every sample, rendered as columns in the sample table |
| Facility Fields | Admin-only fields, at order level and sample level, never shown to researchers |
| Settings | Post-submission instructions and data-handling policy |
| Import / Export | Export, import, and reset to defaults |
How the wizard is assembled
The order wizard at /orders/new is generated from the configuration:
- Each section becomes a wizard step, in section order.
- Fields appear in the step matching their section.
- The Samples step always appears and renders the per-sample fields as table columns.
- A Review step is always last.
Sections are fixed
The order form has exactly two user-facing sections and you
cannot add more: group_details
(“Sequencing Order Details”) and group_sequencing
(“Sequencing Information”). Older exports that contain custom groups still
import — their fields are mapped into one of the two fixed sections by
keyword, with sequencing-related fields (platform, library, instrument,
technology, read, software) landing in Sequencing Information and everything
else in Sequencing Order Details.
Per-sample fields, facility-only fields and MIxS fields are exempt from this mapping — they are placed by their tab, not by a section.
System fields
These ship with every instance. They can be shown, hidden, relabelled or made required, but not deleted.
Sequencing Order Details
| Field | Type | Default |
|---|---|---|
| Sequencing Order Name | text | Visible, optional. The order number ORD-YYYYMMDD-XXXX is generated separately. |
| Number of Samples | number | Visible, optional, valid range 1–500. Pre-fills the sample table. |
Sequencing Information
| Field | Type | Default |
|---|---|---|
| Sequencing Technology | sequencing-tech | Visible. Drives the cascading instrument selector. |
| Instrument Model | text | Visible, optional |
| Library Strategy | select | Visible. WGS, WXS, RNA-Seq, AMPLICON, Bisulfite-Seq, ChIP-Seq, ATAC-seq, Other |
| Library Source | select | Visible. Genomic DNA, Metagenomic, Transcriptomic, Metatranscriptomic, Synthetic, Viral RNA, Other |
| Library Selection | select | Visible. Random, PCR, Random PCR, RT-PCR, Size Fractionation, cDNA, PolyA, Oligo-dT, Unspecified |
Per-sample
| Field | Type | Default |
|---|---|---|
| Organism | organism | Visible and required. NCBI taxonomy lookup. |
| Sample Title | text | Visible and required |
| Sample Alias | text | Visible, optional; can be auto-generated if left blank |
Facility-only, shipped and admin-only from the start:
| Field | Type | Scope |
|---|---|---|
| Internal QC Status | select — Pending, In Review, Passed, Needs Follow-up | Per order |
| Internal Notes | textarea | Per order |
| Sample QC Result | select — Pending, Passed, Failed, Repeat Requested | Per sample |
| Sample Notes | textarea | Per sample |
Field types
| Type | Renders as | Requires |
|---|---|---|
text | Single-line input | — |
textarea | Multi-line input | — |
select | Single-choice dropdown | — |
multiselect | Multi-choice dropdown | — |
checkbox | Boolean toggle | — |
number | Numeric input with min/max | — |
date | Date picker | — |
mixs | MIxS metadata selector | mixs-metadata module |
funding | Funding and grant block | funding-info module |
billing | Cost centre / PSP block | billing-info module |
organism | NCBI taxonomy lookup | ena-sample-fields module |
sequencing-tech | Instrument selector | sequencing-tech (always on) |
barcode | Per-sample barcode assignment | sequencing-tech (always on) |
There is no email, phone, url or
currency field type. Collect those with a text
field and a Format preset under validation —
email, url, phone or
alphanumeric — or a custom regular expression.
Two placement rules are enforced by the model rather than by the UI:
mixs,funding,billingandsequencing-techare order-level only.organismandbarcodeare per-sample only.
Per-field settings
| Setting | Effect |
|---|---|
| Label | What the researcher sees |
| Name | The key the value is stored under in customFields (or the Order column, for system fields) |
| Visible | Whether the field is rendered at all |
| Required | Whether it must be filled before the step can be completed |
| Per-sample | Table column versus once per order |
| Admin-only | Hidden from researchers; shown to facility admins only |
| Help text | Guidance below the field |
| Placeholder, Example | Hints inside and beside the empty field |
| Default value | Pre-filled on load |
| Options | For select and multiselect |
| Validation | Min/max length, min/max value, a Format preset or a custom pattern with a custom message |
| AI validation | A prompt describing valid input plus a strictness of lenient, moderate or strict. Only when the ai-validation module is enabled |
Fields can be reordered by drag and drop within and between sections.
Module dependencies
A field type whose module is off is hidden everywhere, regardless of the field’s own Visible setting. This is the fastest way to remove a whole class of questions.
| Module | Affects |
|---|---|
mixs-metadata | mixs fields |
funding-info | funding fields |
billing-info | billing fields |
ena-sample-fields | Organism, Sample Title, Sample Alias |
ai-validation | Enables AI validation on any field; not itself a field type |
sequencing-tech | sequencing-tech and barcode; always enabled, so these are always available |
The study builder shows a banner — “N fields hidden because related modules are disabled” — with a link to Modules, which is the quickest way to diagnose a field that vanished.
The Settings tab
Advanced Settings holds two blocks that are not about fields at all:
- Post-Submission Instructions — free text shown to a researcher after they submit a sequencing order. Use it for shipping addresses, labelling conventions and drop-off hours.
- Data Handling — two switches, shared with Settings → Accounts:
| Switch | Effect |
|---|---|
| Allow Deletion of Submitted Sequencing Orders | Lets facility admins delete an order after submission. Useful for testing; leave it off in production, because deleting an order destroys its samples. |
| Allow User Assembly Downloads | Lets researchers download final assemblies from the Assemblies view and study pages. |
Neither is restored by Reset to Defaults.
Study Form Builder
/admin/study-form-builder, headed Study Configuration. Four tabs: Study
Fields, Per-Sample, Facility Fields, Import / Export. It also
autosaves.
Four counters across the top give an at-a-glance summary: fields visible to researchers, facility-only fields, user per-sample fields, and fields hidden by disabled modules.
Study fields are filled once per study — principal investigator, study design, research objectives — while per-sample study fields are collected for every sample the study contains. The MIxS selector normally lives here, which is how a study’s environment checklist is chosen.
With the dynamic-studies module enabled, the sidebar entry changes to Define
Studies (/admin/study-definitions) and a study can carry its own
questionnaire instead of sharing one global form. Opening the builder for a
specific study shows “Editing this study’s own questionnaire — changes apply
only to this study.”
Sequencing Run Fields
/admin/sequencing-run-form-builder, headed Sequencing Run Fields. This is
the internal questionnaire stored on each run-sample assignment — the row
that links one sample to one barcode on one physical sequencing run. Its fields
appear in the run plan table and in that table’s Excel import and export, and
nowhere else.
Unlike the other two builders it has no tabs and no autosave: edit fields
inline, then press Save. Add Field appends a new one; the trash icon
removes it. Each row shows the field’s storage name under its label, and
badges for Internal (admin-only) and Hidden.
The shipped defaults are an Oxford Nanopore wet-lab set: Barcode, Depletion (host depletion / no depletion / other), Extraction Date, Extraction Method, Analyte (DNA/RNA), Concentration (ng/uL), Post-PCR Concentration (ng/uL), Total Volume (uL), and Run-Specific Notes.
There is also an API-only action that installs the fuller ONT metagenomics/metatranscriptomics preset across both the order form and the run questionnaire, adding only the fields that are missing:
curl -X POST https://your-seqdesk.example.org/api/admin/sequencing-run-form-config/preset \
-H "Cookie: <facility-admin session>"It answers with how many order fields and run-assignment fields were added.
Removing a field here removes it from the run assignment UI, but values already
captured stay in the database — they are simply no longer surfaced. Re-adding a
field with the same name brings them back into view.
Import, export and reset
Each builder’s Import / Export tab is how you move a form between instances and how you recover from a bad edit.
Export Configuration
Downloads the current state as JSON. Order exports include the order fields, the fixed sections, and related order settings; study exports include the study fields and sections. Do this before any large change — autosave means there is no other undo.
Import Configuration
Upload a previously exported file. Import replaces the current configuration, after a confirmation dialog. Current exports and older exports containing custom groups are both accepted; legacy groups are mapped into the fixed sections.
Reset to Defaults
Restores the built-in SeqDesk layout after a confirmation that says “Export the current configuration first if you want a backup.” For the order form this restores the default fields and sections; it does not touch post-submission instructions or the data-handling switches.
Applying a form at install time
Exported files can be applied by the installer:
seqdesk -y \
--order-form-settings /absolute/path/order-form.json \
--study-form-settings /absolute/path/study-form.jsonFor fully unattended deployments the same definitions can be embedded in
settings.json under forms.order and forms.study, using the same groups
and fields structure that Export Configuration produces:
{
"forms": {
"order": {
"groups": [
{ "id": "group_sequencing", "name": "Sequencing Information", "order": 1 }
],
"fields": [
{
"id": "field_run_type",
"type": "select",
"label": "Run Type",
"name": "run_type",
"groupId": "group_sequencing",
"order": 10
}
]
},
"study": {
"groups": [
{ "id": "group_study_info", "name": "Study Information", "order": 0 }
],
"fields": [
{
"id": "field_study_title",
"type": "text",
"label": "Study Title",
"name": "study_title",
"groupId": "group_study_info",
"order": 1
}
]
}
}
}Worked example: a barcoded ONT intake form
Trim what you do not need
On Per-Sequencing Order Fields, hide Instrument Model — the
sequencing-tech selector already captures the device — and leave Library
Strategy, Source and Selection visible because ENA needs them.
Make the intake unambiguous
Set Number of Samples to required so the sample table is pre-sized, and give
Sequencing Order Name a placeholder such as
e.g. Soil microbiome study - Batch 1.
Add a per-sample barcode
On Per-Sample, add a barcode field. It is per-sample only by construction,
and appears as a column in the sample table.
Add a validated internal id
Still on Per-Sample, add a text field labelled Internal Sample Code with
the alphanumeric format preset and a max length of 12. Researchers now get
an inline error instead of you cleaning up identifiers later.
Keep facility notes private
On Facility Fields, confirm Internal QC Status and Sample QC Result are visible. They are admin-only, so researchers never see them even though they sit on the same records.
Export
Go to Import / Export and download the configuration. Keep it in your
infrastructure repository, and use --order-form-settings when you build the
next instance.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| A field is configured but invisible to researchers | Its module is disabled, or it is marked admin-only | Check Modules, and the field’s Admin-only switch |
| The study builder banner says fields are hidden by modules | Same cause | Follow the Manage modules link on the banner |
| A custom section disappeared after import | The order form has only two fixed sections | Its fields were mapped into one of them; move them with drag and drop |
| Changes seem lost | The order and study builders autosave; the run builder does not | On Sequencing Run Fields, press Save |
Fields must be an array / Groups must be an array | A hand-edited JSON import is malformed | Re-export a valid file and edit from that |
| A per-sample field cannot be made order-level | organism and barcode are per-sample only | Use a different field type |
A mixs, funding, billing or sequencing-tech field cannot be made per-sample | Those types are order-level only | Model the per-sample part as a separate field |
| Run-assignment values vanished from the table | The field was removed from Sequencing Run Fields | Re-add a field with the same name |
| Reset to Defaults did not restore post-submission instructions | Reset covers fields and sections only | Re-enter them on the Settings tab |
See also
- Sequencing Orders & Samples — the wizard these settings build
- Studies — the study questionnaire and MIxS checklists
- Sequencing Technologies — what
backs the
sequencing-techandbarcodefield types - Modules — which module owns which field type, and why enabling one does not place the field