Skip to content

Forms

FormSyntaxUsage
Formfence form title="Contact" method="post" action="/send" submit="Send"Form start.
Inputfield name="email" type="email" label="Email" requiredField.
Textareatextarea name="message" rows="5"Long text.
Selectdropdown / select with optionsChoice list.
Checkboxcheck / checkboxCheckbox.
Radio`radio name=“level” options=“AB”`
Hiddenhidden name="source" value="docs"Hidden value.
Validationregex, min, max, required, help, placeholder, valueConstraints.

The historical field reference is integrated above: field, textarea, dropdown/select, check/checkbox, radio, hidden, submit, help, regex, required, placeholder, value, min, max.

~~~form title="Contact" method="post" action="test.php" submit="Send"
field name="name" label="Name" required placeholder="Your name"
field name="email" type="email" label="Email" required regex="^[^@\s]+@[^@\s]+\.[^@\s]+$" help="Valid email address"
textarea name="message" label="Message" required rows="5" help="Your request in a few lines"
dropdown name="topic" label="Topic" required options="Support|Sales|Other" placeholder="Choose a topic"
check name="privacy" label="I accept the processing of my request" required help="Required before sending"
~~~
Contact POST test.php
~~~form title="Advanced search" method="get" url="/search" submit="Search"
field name="q" label="Keyword" required placeholder="ex: markdown" help="Search sent in the URL"
dropdown name="type" label="Type" options="All:all|Guides:docs|Astro pages:astro" value="all"
field name="limit" type="number" label="Results" min="1" max="50" value="10" help="Between 1 and 50"
check name="exact" label="Exact phrase"
~~~
Advanced search GET /frontmark/search
~~~form title="Workshop registration" type="post" file="workshop.php" submit="Validate"
field name="first_name" label="First name" required regex="^[A-Za-z -]{2,}$" help="At least two characters"
field name="phone" type="tel" label="Phone" regex="^(\\+33|0)[1-9][0-9]{8}$" help="Expected French format"
radio name="level" label="Level" required options="Beginner|Intermediate|Advanced"
dropdown name="slot" label="Slot" required options="Morning:am|Afternoon:pm|Evening:evening" placeholder="Choose"
textarea name="notes" label="Notes" rows="4" placeholder="Constraints, allergies, useful information..."
hidden name="source" value="documentation"
~~~
Workshop registration POST workshop.php
Level