Zeroform

Zeroform

A static and dynamic online form generator

Latest release: 0.8

Available for macOS and Linux

Concept

To create your zeroform you write a plaintext blueprint of your online form, for instance:

title Questionnaire on pill preference

text line
text.title Name
text.prompt Please enter your full name
text.required yes

select single
select.title Preferred pill
select.prompt Which pill do you prefer?
select.option The blue pill
select.option The red pill
select.required yes

text block
text.max 300
text.title Optional comment
text.prompt Anything else you would like us to know?

From such a blueprint, Zeroform can generate either a static (html/css/js only) or a dynamic (php augmented) online form.

Dynamic forms work on practically all php-enabled webhosts - they include a simple, filed-based storage mechanism and a minimal admin interface for viewing and exporting form submissions. To put your form online or offline, you simply move the generated files onto or off your webspace.

Static forms work on virtually every webhost - they do not store any data, but instead allow you to specify how the form can be submitted, for instance via email or direct messages. The given answers are automatically bundled into an easily tranferable format when the user completes the form.

All available form fields and options are described in the guide.

Usage

Assuming your blueprint file is called example_form.whisp you simply pass its path to zeroform:

zeroform example_form.whisp

By default, zeroform generates your form (= the resulting, deployable files) inside a hidden directory adjacent to the blueprint file. For instance, if your blueprint is at ~/my_form/blueprint.whisp, the output will be at ~/my_form/.zeroform_build/.

This can be overridden with the option --build-dir, but please be extra careful where you point it, as this directory gets WIPED on each build:

zeroform example_form.whisp --build-dir [DANGER_THIS_PATH_WILL_BE_WIPED]

The specification for blueprints is described in the guide.

License and source code

Zeroform is licensed under the AGPLv3+.

The source code is available in the repository at codeberg.org/simonrepp/zeroform