Skip to main content

Documentation Index

Fetch the complete documentation index at: https://osforms.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

osforms supports 15 field types across input, choice, scale, display, and layout categories.

Text Inputs

text

Single-line text input.
{
  "id": "full_name",
  "type": "text",
  "label": "Full name",
  "required": true,
  "validation": {
    "minLength": 2,
    "maxLength": 100
  }
}

email

Single-line input with email format validation.
{
  "id": "email",
  "type": "email",
  "label": "Email address",
  "required": true
}

tel

Phone number input. No format enforcement — accepts any string.
{
  "id": "phone",
  "type": "tel",
  "label": "Phone number"
}

url

URL input with format validation.
{
  "id": "website",
  "type": "url",
  "label": "Website URL",
  "placeholder": "https://example.com"
}

number

Numeric input. Supports min / max validation.
{
  "id": "age",
  "type": "number",
  "label": "Age",
  "validation": { "min": 18, "max": 120 }
}

textarea

Multi-line text input. Defaults to 4 rows.
{
  "id": "message",
  "type": "textarea",
  "label": "Message",
  "config": { "rows": 6 }
}

Choice

select

Dropdown single-select. Supports optional search.
{
  "id": "country",
  "type": "select",
  "label": "Country",
  "options": [
    { "id": "us", "label": "United States", "value": "US" },
    { "id": "gb", "label": "United Kingdom", "value": "GB" }
  ],
  "config": { "searchable": true }
}

radio

Single-choice visible option list. Auto-advances in conversational mode.
{
  "id": "plan",
  "type": "radio",
  "label": "Which plan are you on?",
  "options": [
    { "id": "free", "label": "Free", "value": "free" },
    { "id": "pro", "label": "Pro", "value": "pro" }
  ],
  "config": { "layout": "vertical" }
}
Layout options: vertical (default), horizontal, grid

checkbox

Multi-select option list. Submitted as an array of selected values.
{
  "id": "interests",
  "type": "checkbox",
  "label": "What are you interested in?",
  "options": [
    { "id": "a", "label": "API integrations", "value": "api" },
    { "id": "b", "label": "React SDK", "value": "sdk" },
    { "id": "c", "label": "Webhooks", "value": "webhooks" }
  ]
}

date

Date picker. Value submitted as YYYY-MM-DD.
{
  "id": "dob",
  "type": "date",
  "label": "Date of birth"
}

Scale & Rating

rating

Star (or icon) rating. Defaults to 1–5. Auto-advances in conversational mode.
{
  "id": "satisfaction",
  "type": "rating",
  "label": "How satisfied are you?",
  "config": {
    "maxRating": 5,
    "ratingIcon": "star"
  }
}
Icon options: star (default), heart, thumb

scale

NPS-style numeric scale. Auto-advances in conversational mode.
{
  "id": "nps",
  "type": "scale",
  "label": "How likely are you to recommend us?",
  "config": {
    "scaleMin": 0,
    "scaleMax": 10,
    "scaleLowLabel": "Not likely",
    "scaleHighLabel": "Very likely"
  }
}

File Upload

file

File upload input.
{
  "id": "resume",
  "type": "file",
  "label": "Upload your resume",
  "validation": {
    "fileTypes": [".pdf", ".doc", ".docx"],
    "maxFileSize": 5242880
  }
}
maxFileSize is in bytes. Default: 10485760 (10 MB). fileTypes accepts MIME types (image/*, application/pdf) or extensions (.pdf, .jpg).

Display

statement

Display-only text block. No input collected. Use for instructions, section headers, or legal notices.
{
  "id": "intro",
  "type": "statement",
  "label": "Before you continue",
  "description": "Please read our privacy policy before submitting."
}

divider

Visual separator. Supported in classic and stepped modes only. No input collected.
{
  "id": "sep1",
  "type": "divider",
  "label": ""
}

Common Field Properties

Every field shares these properties:
PropertyTypeRequiredDescription
idstringYesUnique identifier within the form. Used as the key in submissions.
typeFieldTypeYesOne of the 15 types above.
labelstringYesQuestion text shown to the user.
descriptionstringNoHelper text displayed below the label.
placeholderstringNoInput placeholder text.
requiredbooleanNoDefault: false.
optionsFieldOption[]For choice typesArray of { id, label, value }.
validationFieldValidationNoSee below.
conditionalLogicConditionalLogicNoShow/hide rules. See Conditional Logic.
configFieldConfigNoType-specific config.

Validation Reference

PropertyTypesDescription
minLengthtext, textareaMinimum character count
maxLengthtext, textareaMaximum character count
minnumber, scale, ratingMinimum numeric value
maxnumber, scale, ratingMaximum numeric value
patterntext, email, telRegex string for format validation
patternErrortext, email, telCustom error message on pattern mismatch
fileTypesfileAllowed MIME types or extensions
maxFileSizefileMax file size in bytes