Formedible provides a comprehensive set of advanced features to handle complex form scenarios, from validation and persistence to analytics.
Comprehensive list of completed and upcoming features.
Get started with advanced features by adding them to your form configuration.
import { useFormedible } from 'formedible';const { Form } = useFormedible({fields: [{ name: 'firstName', type: 'text', label: 'First Name', page: 1 },{ name: 'email', type: 'email', label: 'Email', page: 2,description: 'We'll send updates to {{firstName}}' },{ name: 'location', type: 'location', label: 'Location' },],// Dynamic text in pagespages: [{ page: 1, title: 'Personal Info', description: 'Tell us about yourself' },{ page: 2, title: 'Contact Details', description: 'How can we reach you {{firstName}}?' }],// Cross-field validationcrossFieldValidation: [{fields: ['email'],validator: (values) => values.email ? null : 'Email is required',message: 'Please provide an email'}],// Form persistencepersistence: {key: 'my-form',storage: 'localStorage',restoreOnMount: true},// Analytics trackinganalytics: {onFormStart: (timestamp) => console.log('Form started'),onFormComplete: (timeSpent, data) => console.log('Completed', { timeSpent, data })}});
Guidelines for building robust and user-friendly forms.
Use debouncing for async operations and be mindful of validation frequency.
Exclude sensitive fields from persistence and be careful with analytics data.
Test both success and error scenarios, especially for async operations.
Provide clear feedback for loading states and validation errors.