A complete guide to building forms on your low-code platform
In Fractal Platform, you build forms by placing controls and components on them. These are UI elements that connect to your JSON data and provide interactive functionality.
Every control needs two things:
// 1. Document - Your data source {"Control": "Hello World"} // 2. UI - How to display it {"Control": {"ControlType": "Label"}}
| Feature | Controls | Components |
|---|---|---|
| Data Structure | Single attribute | Multiple attributes or hierarchy |
| Example Data | "Bob" or 25 or true | {Name: "Bob", Age: 25} |
| Complexity | Simple | Complex |
| Use Cases | Text fields, checkboxes, buttons | Charts, maps, grids, comments |
Description: Simple text input field
// Document - Just a string {"Control": "This is TextBox"} // UI - Specify it's a TextBox {"Control": {"ControlType": "TextBox"}}
Description: Bar chart with multiple data points
// Document - Complex object with title and data { "Control": { "Title": { "Name": "Bar", "X": "Bars", "Y": "Value" }, "Columns": [ {"Name": "One", "Value": 10}, {"Name": "Two", "Value": 20} ] } } // UI - Specify Chart type and style { "Control": { "ControlType": "Chart", "Style": "Type:Bar" } }
Description: Display read-only text
// Document {"Control": "This is Label"} // UI {"Control": {"ControlType": "Label"}}
Description: Clickable hyperlink
// Document {"Control": "Click here"} // UI {"Control": {"ControlType": "Link"}}
Description: Single-line text input
// Document {"Control": "Type here..."} // UI {"Control": {"ControlType": "TextBox"}}
Description: Password input (hidden characters)
// Document {"Control": "secretpassword"} // UI { "Control": { "ControlType": "TextBox", "Style": "Type:Password" } }
Description: Bot protection input field
// Document {"Control": "Enter number here"} // UI { "Control": { "ControlType": "TextBox", "Style": "Type:Captcha" } }
Description: Multi-line text area
// Document {"Control": "Long text here..."} // UI {"Control": {"ControlType": "RichTextBox"}}
Description: Phone number input with formatting
// Document {"Control": "+380981112233"} // UI {"Control": {"ControlType": "Phone"}}
Description: Boolean yes/no checkbox
// Document {"Control": true} // UI {"Control": {"ControlType": "CheckBox"}}
Description: Choose one option from multiple choices
// Document { "Control": { "Option1": true, "Option2": false } } // UI {"Control": {"ControlType": "RadioButton"}}
Description: Dropdown list to choose from predefined values
// Document - Selected value {"Control": "One"} // Enum - Available options {"Control": {"Items": ["One", "Two", "Three"]}} // UI {"Control": {"ControlType": "ComboBox"}}
Description: Regular clickable button
// Document {"Control": "Click Me"} // UI {"Control": {"ControlType": "Button"}}
Description: Button styled as a link
// Document {"Control": "Go Back"} // UI { "Control": { "ControlType": "Button", "Style": "Type:Link" } }
Description: Submit button that sends form data
// Document {"Control": "Save"} // UI { "Control": { "ControlType": "Button", "Style": "Type:Submit" } }
Description: Display data in table format
// Document - Array of objects { "Control": [ {"Name": "Bob", "Age": 15}, {"Name": "Rebeca", "Age": 20} ] } // UI {"Control": {"ControlType": "Grid"}}
Description: Grid where rows are clickable links
// Document { "Control": [ {"Name": "Bob", "Age": 15}, {"Name": "Rebeca", "Age": 20} ] } // UI { "Control": { "ControlType": "Grid", "Style": "Type:Link" } }
Description: Hierarchical tree structure
// Document { "Control": [ {"Parent": null, "Name": "MyParent", "Text": "My Parent"}, {"Parent": "MyParent", "Name": "MyChildA", "Text": "My Child A"}, {"Parent": "MyParent", "Name": "MyChildB", "Text": "My Child B"} ] } // UI {"Control": {"ControlType": "TreeView"}}
Description: Render raw HTML
// Document {"Control": "Bold text"} // UI {"Control": {"ControlType": "Raw"}}
Description: File upload button
// Document {"Control": ""} // UI {"Control": {"ControlType": "UploadFile"}}
Description: Display an image
// Document - URL to image {"Control": "https://example.com/image.jpg"} // UI {"Control": {"ControlType": "Picture"}}
Description: Generate QR code from text
// Document - Text to encode {"Control": "https://mywebsite.com"} // UI { "Control": { "ControlType": "Picture", "Style": "Type:QRCode" } }
Description: Embedded video player
// Document - Video file name or URL {"Control": "MyVideo.mp4"} // UI {"Control": {"ControlType": "Media"}}
Description: Embedded YouTube video
// Document - YouTube URL {"Control": "https://www.youtube.com/watch?v=LhOSM6uCWxk"} // UI { "Control": { "ControlType": "Media", "Style": "Type:Youtube" } }
Description: Audio player
// Document {"Control": "MyAudio.mp3"} // UI { "Control": { "ControlType": "Media", "Style": "Type:Audio" } }
Description: Date picker
// Document - Date in YYYY-MM-DD format {"Control": "2023-01-01"} // UI {"Control": {"ControlType": "Calendar"}}
Description: Time picker
// Document - Time in HH:MM format {"Control": "12:30"} // UI {"Control": {"ControlType": "Time"}}
Components are more complex than controls because they work with structured data containing multiple fields. Let's explore each component in detail.
Description: Display multiple tags/labels
// Document - Array of strings {"Control": ["JavaScript", "React", "Node.js"]} // UI {"Control": {"ControlType": "Tags"}}
Description: Like button that adds user name to array
// Document - Array of usernames who liked {"Control": ["Alice", "Bob"]} // UI {"Control": {"ControlType": "Likes"}}
Description: List of messages (simple chat)
// Document - Array of message objects { "Control": [ { "OnDate": "2023-01-01", "Text": "Hello World!", "Who": "Guest" } ] } // UI {"Control": {"ControlType": "Messages"}}
Description: Rich comment system with avatars and pictures
// Document - Array of comment objects { "Control": [ { "Avatar": "Guest.png", "OnDate": "2023-01-01", "Picture": "Message.jpg", "Text": "Great post!", "Who": "Guest" } ] } // UI {"Control": {"ControlType": "Comments"}}
Description: Structured address input
// Document - Address object { "Control": { "Country": "Ukraine", "City": "Kyiv", "District": "Shevchenkivskyi", "Street": "Khreshchatyk", "House": "1", "Appartment": "10" } } // UI {"Control": {"ControlType": "Address"}}
Description: GPS coordinates display on map
// Document - Coordinates as string "lat,lng" {"Control": "50.450001,30.523333"} // UI {"Control": {"ControlType": "GPS"}}
Description: Receive browser parameters like GPS coordinates
// Document - Will be filled automatically { "Control": { "Lat": "", "Lng": "" } } // UI {"Control": {"ControlType": "BrowserParams"}}
Description: Syntax-highlighted code editor
// Document - Code editor configuration { "Control": { "Text": "{\"Attr\":10}", "Type": "json", "FontSize": 14, "IsFormat": true } } // UI {"Control": {"ControlType": "Code"}}
Description: Display data as line graphs
// Document - Graph data with multiple lines { "Control": { "Title": { "Name": "Sales Over Time", "X": "Month", "Y": "Revenue" }, "Lines": [ { "Name": "Product A", "Points": [ {"X": 1, "Y": 10}, {"X": 2, "Y": 20}, {"X": 3, "Y": 15} ] }, { "Name": "Product B", "Points": [ {"X": 1, "Y": 5}, {"X": 2, "Y": 15}, {"X": 3, "Y": 25} ] } ] } } // UI { "Control": { "ControlType": "Chart", "Style": "Type:LineGraphs" } }
Description: Vertical bar chart
// Document - Simple bar chart { "Control": { "Title": { "Name": "Sales by Product", "X": "Products", "Y": "Units Sold" }, "Columns": [ {"Name": "Product A", "Value": 100}, {"Name": "Product B", "Value": 150}, {"Name": "Product C", "Value": 80} ] } } // UI { "Control": { "ControlType": "Chart", "Style": "Type:Bar" } }
Description: Grouped bar chart for comparing categories
// Document - Grouped bars by category { "Control": { "Title": { "Name": "Sales Comparison", "X": "Quarter", "Y": "Revenue" }, "Columns": [ {"Name": "Online", "Group": "Q1", "Value": 100}, {"Name": "Retail", "Group": "Q1", "Value": 150}, {"Name": "Online", "Group": "Q2", "Value": 120}, {"Name": "Retail", "Group": "Q2", "Value": 180} ] } } // UI { "Control": { "ControlType": "Chart", "Style": "Type:Bar" } }
Description: Circular chart showing proportions
// Document { "Control": { "Title": "Market Share", "Parts": [ {"Name": "Company A", "Value": 40}, {"Name": "Company B", "Value": 30}, {"Name": "Company C", "Value": 30} ] } } // UI { "Control": { "ControlType": "Chart", "Style": "Type:Pie" } }
Description: Interactive map with markers
// Document { "Control": { "Title": "Office Locations", "Key": "", "Zoom": 15, "Center": { "Lat": "50.4329658690059", "Lng": "30.57958332067064" }, "Points": [ { "Lat": "50.4329658690059", "Lng": "30.57958332067064" } ] } } // UI {"Control": {"ControlType": "Map"}}
| Type | Examples | Data Structure |
|---|---|---|
| Controls | Label, TextBox, Button, CheckBox, Calendar | Single value: string, number, boolean, date |
| Components | Chart, Map, Messages, Comments, Address | Complex object with multiple fields and arrays |
| Control Name | Category | Data Type | Use Case |
|---|---|---|---|
| Label | Text | string | Display read-only text |
| TextBox | Input | string | Single-line text input |
| RichTextBox | Input | string | Multi-line text input |
| CheckBox | Selection | boolean | Yes/No choice |
| RadioButton | Selection | object | Choose one option |
| ComboBox | Selection | string | Dropdown list |
| Button | Action | string | Trigger actions |
| Calendar | DateTime | string (date) | Pick a date |
| Time | DateTime | string (time) | Pick a time |
| Picture | Media | string (URL) | Display images |
| Grid | Data Display | array | Tabular data |
| Component Name | Category | Key Fields | Use Case |
|---|---|---|---|
| Chart (Bar) | Visualization | Title, Columns | Bar charts |
| Chart (Pie) | Visualization | Title, Parts | Proportions |
| Chart (Line) | Visualization | Title, Lines, Points | Trends over time |
| Map | Location | Center, Points, Zoom | Display locations |
| Messages | Communication | OnDate, Text, Who | Simple chat |
| Comments | Communication | Avatar, Text, Who, Picture | Rich comments |
| Address | Location | Country, City, Street | Structured addresses |
| Code | Development | Text, Type, FontSize | Code editing |
| Tags | Display | Array of strings | Show labels/tags |