Files
metabuilder/packages/form_builder/forms/contact-form.json
johndoe6345789 af80a8e761 feat(form_builder): add contact form with validation and submission handling
- Created contact-form.json defining the structure and validation for the contact form.
- Added package.json for form_builder package with dependencies and exports.
- Implemented functions.json for form field handlers and validation functions.
- Configured storybook for form_builder with various form field stories.
- Established style tokens for form fields including colors and spacing.
- Defined validation patterns and functions for form fields in validators.json.

feat(notification_center): introduce notification components and event handling

- Added ui.json for notification components including summary, toast, and list.
- Created schema.json for Notification entity with fields and relations.
- Implemented event handlers for notification events in handlers.json.
- Established package.json for notification_center with components and scripts.
- Developed functions.json for notification management and display functions.
- Configured storybook for notification_center with various notification stories.
- Defined style tokens for notifications including colors and spacing.
2026-01-02 15:34:42 +00:00

72 lines
2.0 KiB
JSON

{
"$schema": "https://metabuilder.dev/schemas/forms.schema.json",
"schemaVersion": "1.0.0",
"package": "form_builder",
"description": "Form definitions for form builder package",
"forms": [
{
"id": "contact_form",
"name": "ContactForm",
"title": "Contact Us",
"description": "Send us a message",
"layout": "vertical",
"fields": [
{
"name": "name",
"type": "text",
"label": "Name",
"placeholder": "Your name",
"required": true,
"validation": {
"required": "Name is required",
"minLength": 2,
"maxLength": 100,
"messages": {
"minLength": "Name must be at least 2 characters",
"maxLength": "Name cannot exceed 100 characters"
}
}
},
{
"name": "email",
"type": "email",
"label": "Email",
"placeholder": "you@example.com",
"required": true,
"helpText": "We will only use this to reply to your note.",
"validation": {
"required": "Email is required",
"email": true,
"messages": {
"email": "Please enter a valid email address"
}
}
},
{
"name": "message",
"type": "textarea",
"label": "Message",
"placeholder": "How can we help?",
"required": true,
"rows": 4,
"validation": {
"required": "Message is required",
"minLength": 10,
"maxLength": 1000,
"messages": {
"minLength": "Message must be at least 10 characters",
"maxLength": "Message cannot exceed 1000 characters"
}
}
}
],
"submitButton": {
"label": "Send message",
"variant": "primary"
},
"onSubmit": "contact_form.handleSubmit",
"successMessage": "Thanks for reaching out. We will get back to you shortly."
}
]
}