Skip to content

Laadnanimoustapha/QuickForm-Builder-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

QuickForm Builder πŸš€

A powerful, intuitive drag-and-drop form builder for React applications

Support Palestine Free Palestine React License Build Status

πŸ“‹ Short Description

QuickForm Builder is a modern, feature-rich React component that enables developers and non-technical users to create dynamic forms through an intuitive drag-and-drop interface. Build complex forms in minutes, not hours, with real-time preview and multiple export options.


🎯 Comprehensive Overview

What is QuickForm Builder?

QuickForm Builder is a comprehensive form creation solution built with React 18 that revolutionizes how forms are created and managed in web applications. It combines the power of modern web technologies with an intuitive user interface to deliver a seamless form-building experience.

Key Capabilities

🎨 Visual Form Designer

  • Drag-and-drop interface for effortless form creation
  • Real-time preview with instant feedback
  • Professional templates for quick starts
  • Advanced theming and customization options

πŸ“ Rich Field Types

  • Basic Inputs: Text, Email, Password, Number, Phone, URL
  • Advanced Inputs: Date/Time pickers, Color selectors, Range sliders
  • Selection Controls: Dropdowns, Radio buttons, Checkboxes, Multi-select
  • Content Elements: File uploads, Textareas, Rich text areas
  • Layout Components: Headings, Paragraphs, Dividers, Spacers, Images
  • Interactive Elements: Rating systems, Signature pads

βš™οΈ Advanced Features

  • Comprehensive validation rules (required, min/max length, patterns)
  • Conditional logic and field dependencies
  • Multi-step form support with progress tracking
  • Responsive design that works on all devices
  • Accessibility compliance (WCAG 2.1 AA)
  • Internationalization support

πŸ”§ Developer-Friendly

  • Multiple export formats (React JSX, HTML, JSON)
  • Clean, maintainable code generation
  • TypeScript support
  • Extensive API for programmatic control
  • Plugin architecture for custom extensions

Technical Architecture

Built on a robust foundation using:

  • React 18 with Hooks and Context API
  • Modern CSS with CSS Grid and Flexbox
  • Drag & Drop powered by react-beautiful-dnd
  • State Management through React Context
  • Component Architecture with reusable, composable components

πŸš€ Quick Start Guide

Prerequisites

  • Node.js 16.0 or higher
  • npm 7.0 or higher
  • Modern web browser with ES6+ support

Installation

# Clone the repository
git clone https://github.com/your-username/quickform-builder.git
cd quickform-builder

# Install dependencies
npm install

# Start development server
npm start

The application will open at http://localhost:3000

Basic Usage

1. Creating Your First Form

  1. Start with a Template: Click the "Templates" button to choose from pre-built forms
  2. Add Fields: Drag field types from the sidebar to the canvas
  3. Customize Properties: Select any field to modify its properties in the right panel
  4. Preview: Switch to Preview mode to test your form
  5. Export: Generate code or download your form

2. Field Configuration

Each field can be customized with:

// Example field configuration
{
  id: 'email',
  type: 'email',
  label: 'Email Address',
  placeholder: 'Enter your email',
  required: true,
  validation: {
    pattern: '^[^@]+@[^@]+\.[^@]+$',
    message: 'Please enter a valid email'
  }
}

3. Form Settings

Configure global form properties:

// Form settings example
{
  title: 'Contact Form',
  description: 'Get in touch with us',
  submitButtonText: 'Send Message',
  theme: {
    primaryColor: '#3b82f6',
    backgroundColor: '#ffffff',
    borderRadius: '8px',
    spacing: 'normal'
  }
}

Advanced Usage

Custom Field Types

Create custom field components:

// Custom field example
const CustomRatingField = ({ field, value, onChange }) => {
  return (
    <div className="custom-rating">
      {[1, 2, 3, 4, 5].map(star => (
        <button
          key={star}
          onClick={() => onChange(star)}
          className={star <= value ? 'active' : ''}
        >
          ⭐
        </button>
      ))}
    </div>
  );
};

Programmatic Form Creation

import { FormProvider, useForm } from './context/FormContext';

const MyComponent = () => {
  const { addField, updateFormSettings } = useForm();
  
  const createForm = () => {
    // Add fields programmatically
    addField('text', { label: 'Name', required: true });
    addField('email', { label: 'Email', required: true });
    
    // Update form settings
    updateFormSettings({
      title: 'Dynamic Form',
      submitButtonText: 'Submit'
    });
  };
  
  return <button onClick={createForm}>Create Form</button>;
};

πŸ“– Detailed Documentation

Component API

FormBuilder Component

<FormBuilder
  currentView="builder"        // 'builder' | 'preview' | 'export'
  onFormChange={handleChange}  // Callback for form changes
  initialData={formData}       // Initial form configuration
  theme={customTheme}          // Custom theme object
/>

Field Types Reference

Field Type Description Properties
text Single-line text input placeholder, maxLength, pattern
email Email address input placeholder, validation
password Password input field placeholder, minLength
textarea Multi-line text input rows, placeholder, maxLength
number Numeric input min, max, step
date Date picker min, max
select Dropdown selection options, multiple
radio Radio button group options
checkbox Checkbox input checked
file File upload accept, multiple
range Range slider min, max, step
rating Star rating max, allowHalf
signature Signature pad width, height

Validation System

// Validation rules
const validationRules = {
  required: true,
  minLength: 3,
  maxLength: 50,
  pattern: /^[A-Za-z\s]+$/,
  custom: (value) => {
    return value.includes('@') ? null : 'Must contain @';
  }
};

Theming

// Theme configuration
const theme = {
  primaryColor: '#3b82f6',
  backgroundColor: '#ffffff',
  textColor: '#1f2937',
  borderRadius: '8px',
  spacing: 'normal', // 'compact' | 'normal' | 'spacious'
  fontFamily: 'Inter, sans-serif'
};

🎨 Templates Gallery

Business Forms

  • Contact Form: Name, email, phone, message
  • Job Application: Personal info, experience, resume upload
  • Lead Generation: Company details, requirements, budget

Survey Forms

  • Customer Satisfaction: Rating scales, feedback
  • Product Feedback: Multi-choice, suggestions
  • Event Registration: Personal details, preferences

E-commerce Forms

  • Checkout Form: Billing, shipping, payment
  • Product Review: Rating, photos, comments
  • Return Request: Order details, reason, photos

πŸ”§ Configuration Options

Environment Variables

# .env file
REACT_APP_API_URL=https://api.example.com
REACT_APP_THEME_PRIMARY=#3b82f6
REACT_APP_MAX_FILE_SIZE=10485760
REACT_APP_ALLOWED_FILE_TYPES=.jpg,.png,.pdf

Build Configuration

// package.json scripts
{
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "build:prod": "npm run build && npm run optimize",
    "optimize": "npx imagemin src/assets/* --out-dir=build/static/media"
  }
}

πŸš€ Future Features & Roadmap

Version 2.0 - Enhanced Functionality

  • Advanced Logic Builder

    • Visual conditional logic editor
    • Complex branching scenarios
    • Field dependency mapping
    • Dynamic field visibility
  • Multi-Step Forms

    • Step-by-step form creation
    • Progress indicators
    • Save and resume functionality
    • Step validation
  • Database Integration

    • Direct database connections
    • Real-time data sync
    • Form submission storage
    • Analytics dashboard

Version 2.1 - Collaboration Features

  • Team Collaboration

    • Real-time collaborative editing
    • Comment system
    • Version history
    • Role-based permissions
  • Form Sharing

    • Public form links
    • Embed codes
    • Social media integration
    • QR code generation

Version 2.2 - Advanced Integrations

  • Third-Party Integrations

    • Zapier webhooks
    • Google Sheets sync
    • Mailchimp integration
    • Slack notifications
  • Payment Processing

    • Stripe integration
    • PayPal support
    • Subscription forms
    • Invoice generation

Version 3.0 - AI-Powered Features

  • AI Form Builder

    • Natural language form creation
    • Smart field suggestions
    • Auto-validation rules
    • Content optimization
  • Analytics & Insights

    • Form performance metrics
    • User behavior analysis
    • A/B testing capabilities
    • Conversion optimization
  • Advanced Customization

    • Custom CSS editor
    • JavaScript code injection
    • Plugin marketplace
    • White-label solutions

Long-term Vision

  • Mobile App Builder

    • Native mobile form apps
    • Offline form filling
    • Push notifications
    • GPS location capture
  • Enterprise Features

    • SSO integration
    • Advanced security
    • Compliance tools (GDPR, HIPAA)
    • Enterprise support

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

# Fork and clone the repository
git clone https://github.com/your-username/quickform-builder.git

# Create a feature branch
git checkout -b feature/amazing-feature

# Make your changes and commit
git commit -m "Add amazing feature"

# Push to your fork and create a Pull Request
git push origin feature/amazing-feature

Code Style

  • Use ESLint and Prettier for code formatting
  • Follow React best practices
  • Write comprehensive tests
  • Document new features

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • React team for the amazing framework
  • Contributors and community members
  • Open source libraries that made this possible

πŸ“ž Support


Made with ❀️ by the QuickForm Builder Team

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors