{% import "macros" as m %} Rocket Form Example

Form Example

{% if errors | length > 0 %}
error: {{ errors | length }} field{{ errors | length | pluralize }} failed to validate
{% endif %}
About You
{{ m::input(label="Name", type="text", name="account.name") }}
{{ m::input(label="Email Address", type="text", name="account.email") }}
{{ m::input(label="Password", type="password", name="account.password.first") }}
{{ m::input(label="Confirm Password", type="password", name="account.password.second") }}
Metadata
{{ m::input(label="Title", type="text", name="submission.title") }}
{{ m::input(label="Publish Date", type="date", name="submission.date") }}
{{ m::select( label="Rights Assignment", name="submission.rights", options=["Public", "Reserved", "Exclusive"] ) }}

{{ m::checkbox(name="submission.category", label="Biology", value="Biology") }}
{{ m::checkbox(name="submission.category", label="Chemistry", value="Chemistry") }}
{{ m::checkbox(name="submission.category", label="Physics", value="Physics") }}
{{ m::checkbox(name="submission.category", label="CS", value="CS") }}
Contents {{ m::textarea( label="Abstract", name="submission.abstract", placeholder="Your abstract, max 250 characters...", max=250 ) }} {{ m::input( label="File to Upload (PDF, max 1MiB)", type="file", name="submission.file" ) }}
{{ m::checkbox(name="submission.ready", label="Submission is ready for review.") }}