A responsive PHP and MySQL task management application with a JSON-driven form builder. Administrators can define the task form, and users can create, view, edit, and delete tasks from the generated form.
- Detail and Review form sections
- Up to three builder columns on larger screens
- Active/inactive sections and fields
- Text, textarea, radio, date, and attachment fields
- Required-field validation and radio-option validation
- Configurable attachment extensions with a 5 MB upload limit
- Automatic task ID generation
- AJAX task save, update, view, and delete operations
- Historical form snapshots for reliable task viewing and edit compatibility checks
- Image previews and PDF/file links in task details
- Paginated, searchable, sortable task history table
- Responsive layouts for desktop, tablet, and mobile
- PHP 8.1 or newer
- MySQL 8 or MariaDB 10.4+
- Apache with PHP enabled
- PDO MySQL extension
- WAMP, XAMPP, or another equivalent local PHP environment
-
Place the project folder inside your web server's document root. For WAMP this is commonly the
wwwdirectory; for XAMPP it is commonlyhtdocs. -
Start Apache and MySQL from the local server control panel.
-
Import
database/schema.sqlusing phpMyAdmin or the MySQL client. -
Check the database values in
config/config.php. -
Confirm that the
uploads/directory is writable by Apache. -
Open the project through your local server, for example:
http://localhost/dynamic_task_form_builder/
The application starts with a default form configuration if no settings have been saved yet.
The schema creates the dynamic_task_form_builder database and these tables:
task_form_settings: stores form-builder configuration as JSONtasks: stores task information and the form snapshot used when the task was createdtask_values: stores values entered into dynamic fieldstask_attachments: stores uploaded-file metadata
Task records and their values/attachments are separate from form settings. Deleting a task does not delete the form configuration.
- Open Form Settings from the Task Information page.
- Add Detail or Review sections.
- Configure each section's title, ID, type, and active state.
- Add fields and configure their type, label, ID, active state, required state, options, or extensions.
- Select Save Settings.
- The application saves the configuration and redirects to the Task Information page.
- Fill in the task information and any active dynamic fields.
- Upload files only through configured Attachment fields.
- Select Save Task to create a task and generate its task ID.
- Use the History table to search, sort, paginate, view, edit, or delete tasks.
View always uses the task's historical form snapshot. Edit is allowed only when the sections and fields that were active at submission are still available and compatible with the current form settings.
- Uploaded files are assigned generated storage names.
- File extension, upload status, and file size are validated server-side.
- The upload directory blocks PHP and other executable script extensions through
.htaccess. - Runtime uploads are excluded from Git by
.gitignore.
Do not commit production credentials, private uploads, or database exports.
api/ AJAX request handlers
assets/ CSS and browser JavaScript
config/ Database and application configuration
database/ MySQL schema
includes/ Shared PHP helpers and layout
uploads/ Runtime attachment storage
index.php Task form and task history
settings.php Form-builder screen
From the project directory:
git init
git add .
git commit -m "Initial dynamic task form builder"
git branch -M main
git remote add origin https://github.com/chiragpatel009/php-dynamic-form-builder-task-management.git
git push -u origin mainCreate the GitHub repository first and replace the placeholder remote URL. Authentication may require a GitHub personal access token or GitHub CLI login.