Schema Structure
The Salesive form schema follows a hierarchical structure: Pages → Sections → Fields. This organization helps create intuitive and maintainable configuration forms.Schema Hierarchy
Root Schema
The root of your schema file contains an array of pages:Page Object
Pages are the top-level organizational unit in your form.Structure
Properties
Unique identifier for the page. Use lowercase letters, numbers, and hyphens
only. Example:
"home", "about-us", "contact"Display name shown in the form UI. Should be user-friendly and descriptive.
Example:
"Home Page", "About Us Page", "Contact Information"Optional explanation of what this page configures. Helps users understand
the purpose. Example:
"Configure your homepage content and layout"Array of section objects containing related field groups.
Example
Section Object
Sections group related fields within a page for better organization.Structure
Properties
Unique identifier for the section within its page. Use lowercase with
hyphens. Example:
"hero", "contact-info", "brand-colors"Section heading displayed to users. Should clearly indicate the content
group. Example:
"Hero Section", "Contact Information", "Brand Colors"Optional helper text explaining what fields in this section control.
Example:
"Primary hero messaging and banners"Array of field objects representing form inputs.
Example
Field Object
Fields are the actual form inputs where users enter configuration data.Base Structure
All fields share common properties:Common Properties
Unique identifier for the field. This becomes the variable name in
salesive.config.json. Use camelCase for consistency with JavaScript
conventions. Example: "heroTitle", "primaryColor", "phoneNumber"Field type determining the input component and data format. Options:
"text", "media", "color", "select"Display label shown above the field. Should be clear and concise.
Example:
"Hero Title", "Primary Color", "Phone Number"Optional helper text providing additional context or instructions.
Example:
"Upload or select hero banner images"Default value for the field. Type depends on the field type. - Text fields:
"string" - Color fields: "#hexcode" - Media fields: "url" or ["url1", "url2"] - Select fields: "option value"Whether the field must be filled before form submission. Default:
falseType-Specific Properties
Different field types have additional properties:Text Fields
HTML input type:
"text", "textarea", "email", "tel", "url",
"number"Placeholder text shown in empty inputs
Media Fields
Type of media:
"image", "video", "file"Allow multiple file uploads Default:
falseMinimum number of items required (when
multiple is true)Maximum number of items allowed (when
multiple is true)Color Fields
Select Fields
Data type:
"text", "number", "boolean"Allow multiple selections Default:
falseArray of option objects with
label and value propertiesComplete Example
Here’s a complete schema demonstrating all elements:Best Practices
Organization Tips - Group related fields into logical sections - Use
clear, user-friendly labels and descriptions - Provide sensible default
values - Mark essential fields as required
Validation
The Form Builder automatically validates your schema:- Ensures required properties are present
- Checks for duplicate IDs
- Validates field type configurations
- Confirms proper JSON syntax
Next: Field Types
Learn about all available field types and their specific options

