Advanced Features
This section covers Schema FormX's advanced features including custom components, form validation, group forms, and dependency linkage.
Features Overview
Custom Components
Create custom form components to meet specific design requirements.
Key Points:
- Arbitrary UI components can be used
- Support for registering multiple custom components
- Special handling of empty and multiple values
Example:
Learn more about custom components →
Form Validation
Schema FormX provides a built-in validation mechanism based on field configuration.
Key Points:
- Required field validation via
requiredproperty - Custom validation via
validatorfunction - Support for async validation
Example:
Learn more about form validation →
Group Forms
Group forms allow you to organize form fields into logical groups for display.
Key Points:
- Use GroupSchema configuration
- Support custom group containers
- Cross-group dependency linkage
Example:
Learn more about group forms →
Dependency Linkage
Dependency linkage automatically triggers update logic when dependent field values change.
Key Points:
- Declare dependencies with
deps - Trigger logic with
onDepsChange - Support async operations and data patching
Example:
Learn more about dependency linkage →
Feature Comparison
Use Scenarios
Complex Business Forms
When a form contains complex business logic, dependency linkage can help:
Dynamic Form Configuration
When form configuration needs to change based on user input:
Multi-Step Forms
Use group forms to implement multi-step forms:
Best Practices
- Use as needed: Choose appropriate features based on actual requirements, avoid over-engineering
- Performance optimization: For complex dependency linkage, pay attention to performance optimization
- Error handling: Add proper error handling for async operations
- Code reuse: Encapsulate common functionality into reusable modules