Question Types

Hidden / Implicit

The hidden question type lets you collect an implicit or derived answer without actually prompting the user.

Here's a simple example:

let year = await form.short('What year were you born?', {number: true});
await form.hidden('age', new Date().getFullYear() - year);

Which eventually creates a submission that looks something like this:

You can use hidden questions to capture parts of the URL query string.

Return Value

hidden(question, answer) returns answer unmodified.


No hidden-specific options exist at this time. You can pass global options, which are valid for all question types.