Employee Information Form
A WordPress plugin that adds an employee information form using shortcode [employee_form]
by Employee Form Plugin(M.K) · github.com/mkerror420/employee-information-plugin
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/mkerror420/employee-information-plugin/archive/refs/heads/main.zipEmployee Information Form Plugin
A comprehensive WordPress plugin for collecting and managing employee information through a customizable form.
Features
- Custom Form Fields: All required employee information fields including personal details, contact information, and professional data
- Shortcode Integration: Display the form anywhere using
[employee_form]shortcode - Security: Built-in nonce verification, input sanitization, and validation
- Admin Dashboard: View and manage submitted employee entries
- Data Export: Export employee data to CSV format
- Responsive Design: Mobile-friendly form interface
- Form Validation: Client-side and server-side validation
- Pagination: Efficient handling of large datasets in admin panel
Installation
- Upload the
employee-detailsfolder to your/wp-content/plugins/directory - Activate the plugin through the WordPress admin panel
- Use the shortcode
[employee_form]on any page or post to display the form
Form Fields
The form includes the following fields:
Personal Information
- Employee Name (required)
- Employee ID (required)
- Date of Birth (required)
- Blood Group (required) - Dropdown: A+, A-, B+, B-, AB+, AB-, O+, O-
- Marital Status (required) - Dropdown: Single, Married, Other
- NID Number (required)
Professional Information
- Job Title/Position (required)
- Designation (required)
- Department Name (required)
Contact Information
- Email (required)
- Mobile Number (required)
- Guardian's Mobile Number (required)
- Address (required)
Additional Information
- Comments (optional)
Usage
Frontend Form
Add the following shortcode to any page, post, or widget:
[employee_form]
Admin Panel
After activation, you'll find an "Employee Information" menu item in your WordPress admin dashboard. This provides:
- View Entries: Browse all submitted employee information
- Pagination: Navigate through large datasets efficiently
- CSV Export: Download all employee data in CSV format
- Search & Filter: (Future enhancement)
Database Structure
The plugin creates a custom table wp_employee_information with the following columns:
id(Primary Key)employee_namejob_titleemployee_iddesignationdepartment_namemobile_numberguardian_mobile_numbernid_numberblood_groupdate_of_birthmarital_statusemailaddresscommentscreated_at
Security Features
- Nonce Verification: Protects against CSRF attacks
- Input Sanitization: All user inputs are properly sanitized
- SQL Injection Prevention: Uses WordPress $wpdb prepare() method
- Data Validation: Server-side validation for all required fields
- XSS Protection: Output escaping for all displayed data
Customization
CSS Styling
The plugin includes responsive CSS styles in:
/assets/css/style.css(Frontend)/assets/css/admin.css(Admin)
JavaScript Validation
Client-side validation is handled by:
/assets/js/script.js
File Structure
employee-details/
├── employee-information-form.php # Main plugin file
├── assets/
│ ├── css/
│ │ ├── style.css # Frontend styles
│ │ └── admin.css # Admin styles
│ └── js/
│ └── script.js # Frontend JavaScript
└── README.md # This file
Requirements
- WordPress 5.0 or higher
- PHP 7.4 or higher
- MySQL 5.6 or higher
Changelog
Version 1.0.0
- Initial release
- Basic form functionality
- Admin dashboard
- CSV export
- Responsive design
- Security features
Support
For support and feature requests, please contact the plugin developer.
License
This plugin is released under the GPL v2 license.