Skip to content

Form blocks

Form Blocks are the building blocks of Forminit submissions. Each block represents a specific type of data you can collect from your forms.

  • Build your form with Form Blocks. Combine different block types to create any form structure you need.
  • Built-in server-side validation. Blocks like phone, email, and country automatically validate data on the server. No setup required.
  • Use the Sender block. For the best Forminit experience, always include a sender block to identify who submitted the form.
  • Clear submission schema. Form Blocks give you a well-defined, consistent structure for every submission.

Form Block Example

Forminit supports two categories of blocks:

CategoryDescriptionExamples
Object BlocksComplex data structures with multiple properties. Can only appear once per submission.sender, tracking
Field BlocksIndividual fields identified by a unique name. Can have multiple instances with different names.text, email, rating, etc.

How you name fields depends on your submission format:

FormatObject Block PatternField Block Pattern
FormDatafi-{blockType}-{property}fi-{blockType}-{name}
JSON{ type, properties: {...} }{ type, name, value }

Examples:

FormData: fi-sender-email, fi-text-message, fi-rating-satisfaction
JSON: { type: "sender", properties: { email: "..." } }
JSON: { type: "text", name: "message", value: "..." }

Collects information about the person submitting the form. Can only appear once per submission.

At least one of the following properties is required: userId, email, phone, firstName, lastName, or fullName.

PropertyTypeFormData FieldDescriptionValidation
emailstringfi-sender-emailSubmitter’s email addressValid email format
firstNamestringfi-sender-firstNameSubmitter’s first name-
lastNamestringfi-sender-lastNameSubmitter’s last name-
fullNamestringfi-sender-fullNameSubmitter’s full name-
phonestringfi-sender-phoneSubmitter’s phone numberE.164 format
titlestringfi-sender-titleTitle (Mr, Mrs, Dr, Prof)-
userIdstringfi-sender-userIdUser ID from your system-
addressstringfi-sender-addressStreet address-
citystringfi-sender-cityCity name-
countrystringfi-sender-countryCountryISO 3166-1 alpha-2
companystringfi-sender-companyCompany or organization-
positionstringfi-sender-positionJob title or position-

FormData Example:

<input type="text" name="fi-sender-firstName" placeholder="First name" />
<input type="text" name="fi-sender-lastName" placeholder="Last name" />
<input type="email" name="fi-sender-email" placeholder="Email" />
<input type="tel" name="fi-sender-phone" placeholder="Phone" />

JSON Example:

{
  "type": "sender",
  "properties": {
    "email": "john@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "phone": "+12025550123",
    "company": "Acme Corp",
    "position": "Software Engineer"
  }
}

Each field block requires a unique name identifier. You can have multiple instances of the same block type with different names.

Free-form text field for messages, comments, or any string input.

PropertyValue
Typetext
Value Typestring
FormData Patternfi-text-{name}
ValidationNone
<textarea name="fi-text-message" placeholder="Your message"></textarea>
<input type="text" name="fi-text-subject" placeholder="Subject" />
{ "type": "text", "name": "message", "value": "Hello from Forminit!" }

Numeric input field for quantities, amounts, or any numerical data.

PropertyValue
Typenumber
Value Typenumber
FormData Patternfi-number-{name}
ValidationMust be a valid number
<input type="number" name="fi-number-quantity" placeholder="Quantity" />
<input type="number" name="fi-number-budget" placeholder="Budget" />
{ "type": "number", "name": "budget", "value": 5000 }

Email address field with format validation. Use for collecting additional emails beyond the sender’s email.

PropertyValue
Typeemail
Value Typestring
FormData Patternfi-email-{name}
ValidationValid email format
<input type="email" name="fi-email-invitee" placeholder="Invitee email" />
<input type="email" name="fi-email-backup" placeholder="Backup email" />
{ "type": "email", "name": "invitee", "value": "colleague@example.com" }

Note: For the submitter’s primary email, use fi-sender-email instead.


Phone number field with E.164 format validation. Use for collecting additional phone numbers beyond the sender’s phone.

PropertyValue
Typephone
Value Typestring
FormData Patternfi-phone-{name}
ValidationE.164 format (e.g., +12025550123)
<input type="tel" name="fi-phone-emergency" placeholder="Emergency contact" />
<input type="tel" name="fi-phone-work" placeholder="Work phone" />
{ "type": "phone", "name": "emergency", "value": "+14155550123" }

Note: For the submitter’s primary phone, use fi-sender-phone instead.


URL field with format validation for websites and links.

PropertyValue
Typeurl
Value Typestring
FormData Patternfi-url-{name}
ValidationValid URL format
<input type="url" name="fi-url-website" placeholder="Your website" />
<input type="url" name="fi-url-linkedin" placeholder="LinkedIn profile" />
{ "type": "url", "name": "website", "value": "https://johndoe.com" }

Selection field for dropdown menus. Supports both single and multi-select.

PropertyValue
Typeselect
Value Typestring or string[]
FormData Patternfi-select-{name}
ValidationNone

Single Select:

<select name="fi-select-plan">
  <option value="Basic">Basic</option>
  <option value="Pro">Pro</option>
  <option value="Enterprise">Enterprise</option>
</select>
{ "type": "select", "name": "plan", "value": "Pro" }

Multi-Select:

<select name="fi-select-services" multiple>
  <option value="web-design">Web Design</option>
  <option value="seo">SEO</option>
  <option value="marketing">Marketing</option>
</select>
{ "type": "select", "name": "services", "value": ["web-design", "seo"] }

Radio button field for single-choice selection from a group of options.

PropertyValue
Typeradio
Value Typestring
FormData Patternfi-radio-{name}
ValidationNone
<input type="radio" name="fi-radio-priority" value="low" /> Low
<input type="radio" name="fi-radio-priority" value="medium" /> Medium
<input type="radio" name="fi-radio-priority" value="high" /> High
{ "type": "radio", "name": "priority", "value": "high" }

Checkbox field for single or multi-choice selection. Single checkbox returns a string, multiple checkboxes with the same name return an array.

PropertyValue
Typecheckbox
Value Typestring or string[]
FormData Patternfi-checkbox-{name}
ValidationNone

Single Checkbox:

<input type="checkbox" name="fi-checkbox-newsletter" value="yes" /> Subscribe to newsletter
{ "type": "checkbox", "name": "newsletter", "value": "yes" }

Multiple Checkboxes:

<input type="checkbox" name="fi-checkbox-features" value="api" /> API Access
<input type="checkbox" name="fi-checkbox-features" value="support" /> Priority Support
<input type="checkbox" name="fi-checkbox-features" value="analytics" /> Analytics
{ "type": "checkbox", "name": "features", "value": ["api", "support"] }

Rating input for satisfaction scores, reviews, or any 1-5 scale rating.

PropertyValue
Typerating
Value Typeinteger
FormData Patternfi-rating-{name}
ValidationInteger between 1 and 5
<input type="number" name="fi-rating-satisfaction" min="1" max="5" />
{ "type": "rating", "name": "satisfaction", "value": 5 }

Date/time field with ISO 8601 format validation.

PropertyValue
Typedate
Value Typestring
FormData Patternfi-date-{name}
ValidationISO 8601 format

Accepted Formats:

  • Date only: 2025-01-15
  • Date and time: 2025-01-15T10:30:00Z
<input type="date" name="fi-date-appointment" />
<input type="datetime-local" name="fi-date-meeting" />
{ "type": "date", "name": "appointment", "value": "2025-01-15T10:30:00Z" }

File upload field. Requires multipart/form-data content type.

PropertyValue
Typefile
Value Typebinary
FormData Patternfi-file-{name}
ValidationMust use FormData
<input type="file" name="fi-file-resume" />
<input type="file" name="fi-file-attachments" multiple />

Country selector using ISO 3166-1 alpha-2 codes. Use for shipping, billing, or any country selection beyond the sender’s country.

PropertyValue
Typecountry
Value Typestring
FormData Patternfi-country-{name}
ValidationISO 3166-1 alpha-2 code
<select name="fi-country-shipping">
  <option value="US">United States</option>
  <option value="GB">United Kingdom</option>
  <option value="CA">Canada</option>
  <option value="DE">Germany</option>
  <!-- ... -->
</select>
{ "type": "country", "name": "shipping", "value": "GB" }

Common Country Codes:

CodeCountry
USUnited States
GBUnited Kingdom
CACanada
DEGermany
FRFrance
AUAustralia
JPJapan
TRTürkiye

For a complete list of ISO 3166-1 alpha-2 country codes, see: Country Codes Reference


Captures marketing attribution and UTM parameters at submission time. Can only appear once per submission.

PropertyTypeFormData FieldDescription
utmSourcestringfi-tracking-utmSourceCampaign traffic source (e.g., google, newsletter)
utmMediumstringfi-tracking-utmMediumMarketing medium (e.g., cpc, email)
utmCampaignstringfi-tracking-utmCampaignCampaign name or identifier
utmTermstringfi-tracking-utmTermPaid keyword or search term
utmContentstringfi-tracking-utmContentAd/content variant identifier
referrerstringfi-tracking-referrerPrevious page URL
gclidstringfi-tracking-gclidGoogle Ads click identifier
wbraidstringfi-tracking-wbraidGoogle Web to App conversion identifier
gbraidstringfi-tracking-gbraidGoogle App to Web conversion identifier
fbclidstringfi-tracking-fbclidFacebook click identifier
msclkidstringfi-tracking-msclkidMicrosoft Ads click identifier
ttclidstringfi-tracking-ttclidTikTok click identifier
twclidstringfi-tracking-twclidTwitter/X click identifier
li_fat_idstringfi-tracking-li_fat_idLinkedIn click identifier
amzclidstringfi-tracking-amzclidAmazon Ads click identifier
mc_cidstringfi-tracking-mc_cidMailchimp campaign ID
mc_eidstringfi-tracking-mc_eidMailchimp subscriber ID

JSON Example:

{
  "type": "tracking",
  "properties": {
    "utmSource": "google",
    "utmMedium": "cpc",
    "utmCampaign": "summer_sale",
    "referrer": "https://google.com/search",
    "gclid": "CjwKCAjw..."
  }
}

Here’s a complete form submission using JSON format with multiple block types:

{
  "blocks": [
    {
      "type": "sender",
      "properties": {
        "email": "john@example.com",
        "firstName": "John",
        "lastName": "Doe",
        "phone": "+12025550123",
        "company": "Acme Corp"
      }
    },
    {
      "type": "tracking",
      "properties": {
        "utmSource": "google",
        "utmMedium": "cpc",
        "utmCampaign": "summer_sale"
      }
    },
    {
      "type": "text",
      "name": "message",
      "value": "I would like to learn more about your services."
    },
    {
      "type": "number",
      "name": "budget",
      "value": 5000
    },
    {
      "type": "select",
      "name": "plan",
      "value": "Enterprise"
    },
    {
      "type": "radio",
      "name": "priority",
      "value": "high"
    },
    {
      "type": "checkbox",
      "name": "features",
      "value": ["api", "support"]
    },
    {
      "type": "rating",
      "name": "urgency",
      "value": 4
    },
    {
      "type": "date",
      "name": "preferred_date",
      "value": "2025-01-15"
    },
    {
      "type": "country",
      "name": "shipping",
      "value": "US"
    }
  ]
}

Block TypeValidation Rule
sender.emailValid email format
sender.phoneE.164 format (+12025550123)
sender.countryISO 3166-1 alpha-2 code
emailValid email format
phoneE.164 format (+12025550123)
urlValid URL format
ratingInteger 1-5
dateISO 8601 date/time
countryISO 3166-1 alpha-2 code
numberValid number
fileFormData only

LimitValue
Maximum field blocks per submission30
Maximum blocks of same type20
Object blocks per type1

After you submit your first submission, your form blocks become your form schema.

You can manage your blocks from Form Settings → Blocks:

  • Change labels. Rename blocks for better understanding in the dashboard.
  • Reorder blocks. Change the display order of your blocks.
  • Hide blocks. Hide blocks you don’t want to see in the submissions view.