WP SmartForms Pro
A comprehensive WordPress form builder plugin with integrated payment processing via Stripe and Razorpay. Build beautiful, responsive forms with drag-and-drop functionality and accept payments seamlessly.
by SmartForms Team · github.com/eshaanmanchanda/smartform-pro
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/eshaanmanchanda/smartform-pro/archive/refs/heads/main.zipA comprehensive WordPress form builder plugin with integrated payment processing via Stripe and Razorpay. Build beautiful, responsive forms with drag-and-drop functionality and accept payments seamlessly.
🚀 Features
Form Builder
- Drag & Drop Interface: Intuitive form builder with visual editor
- Multiple Field Types: Text, email, number, dropdown, radio, checkbox, textarea, file upload, payment fields
- Conditional Logic: Show/hide fields based on user selections
- Form Validation: Client-side and server-side validation
- Custom Styling: CSS classes and custom field properties
Payment Integration
- Stripe Integration: Accept credit cards, Apple Pay, Google Pay, and more
- Razorpay Integration: Support for UPI, cards, wallets, and net banking
- Secure Processing: PCI-compliant payment handling
- Webhook Support: Real-time payment status updates
- Multiple Currencies: Support for USD, EUR, GBP, INR, and more
Submission Management
- Admin Dashboard: View and manage all form submissions
- Payment Tracking: Monitor payment status and transaction details
- Export Functionality: Export submissions to CSV
- Bulk Actions: Process multiple submissions at once
- Detailed Analytics: Form performance and payment statistics
Developer Friendly
- REST API: Complete API for form management and submissions
- Hooks & Filters: WordPress actions and filters for customization
- Gutenberg Block: Native WordPress block editor support
- Shortcode Support: Easy form embedding with shortcodes
- Clean Code: Well-documented, secure, and extensible
📋 Requirements
- WordPress 5.0 or higher
- PHP 7.4 or higher
- MySQL 5.6 or higher
- SSL certificate (required for payment processing)
⚡ Quick Start
-
Installation: Upload the plugin to your
/wp-content/plugins/directory and activate it. -
Create Your First Form:
- Go to SmartForms → Add New
- Use the drag-and-drop builder to add fields
- Configure form settings and payment options
- Publish the form
-
Display the Form:
- Use shortcode:
[wpsfp_form id="123"] - Or add the Gutenberg block "SmartForm"
- Or use PHP:
<?php echo do_shortcode('[wpsfp_form id="123"]'); ?>
- Use shortcode:
-
Payment Setup:
- Go to SmartForms → Settings
- Configure Stripe and/or Razorpay credentials
- Set webhook URLs for payment notifications
🔧 Configuration
Stripe Setup
- Create a Stripe account at stripe.com
- Get your API keys from the Stripe Dashboard
- In WordPress admin, go to SmartForms → Settings → Stripe
- Enter your Publishable Key and Secret Key
- Set the webhook URL:
https://yoursite.com/wp-json/wpsfp/v1/stripe/webhook
Razorpay Setup
- Create a Razorpay account at razorpay.com
- Get your Key ID and Key Secret from the Dashboard
- In WordPress admin, go to SmartForms → Settings → Razorpay
- Enter your Key ID and Key Secret
- Set the webhook URL:
https://yoursite.com/wp-json/wpsfp/v1/razorpay/webhook
📊 Usage Examples
Basic Contact Form
[wpsfp_form id="1"]
Payment Form with Custom Class
[wpsfp_form id="2" class="my-payment-form"]
PHP Integration
<?php
// Display form
echo do_shortcode('[wpsfp_form id="3"]');
// Get form submissions
$submissions = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}wpsfp_submissions WHERE form_id = 3");
?>
🎨 Customization
CSS Styling
The plugin includes default styling that you can customize:
/* Form container */
.wpsfp-form {
max-width: 600px;
margin: 0 auto;
}
/* Field styling */
.wpsfp-input,
.wpsfp-textarea,
.wpsfp-select {
width: 100%;
padding: 12px;
border: 2px solid #e1e1e1;
border-radius: 6px;
}
/* Submit button */
.wpsfp-submit-btn {
background: #0073aa;
color: white;
padding: 15px 30px;
border: none;
border-radius: 6px;
}
WordPress Hooks
// Customize form output
add_filter('wpsfp_form_html', function($html, $form_id) {
// Modify form HTML
return $html;
}, 10, 2);
// After successful payment
add_action('wpsfp_stripe_payment_succeeded', function($submission, $payment_intent) {
// Custom logic after payment
}, 10, 2);
🔌 API Reference
REST Endpoints
POST /wp-json/wpsfp/v1/submit- Submit a formPOST /wp-json/wpsfp/v1/payment-intent- Create payment intentGET /wp-json/wpsfp/v1/forms/{id}- Get form configurationGET /wp-json/wpsfp/v1/submissions- Get submissions (admin only)
Shortcode Parameters
id(required) - Form IDclass(optional) - Additional CSS classes
📁 File Structure
wp-smartforms-pro/
├── wp-smartforms-pro.php # Main plugin file
├── includes/
│ ├── class-database.php # Database management
│ ├── class-form-post-type.php # Custom post type
│ ├── class-admin.php # Admin interface
│ ├── class-rest-api.php # REST API endpoints
│ ├── class-form-renderer.php # Form display logic
│ ├── class-payment-handler.php # Payment processing
│ ├── class-stripe-handler.php # Stripe integration
│ ├── class-razorpay-handler.php # Razorpay integration
│ └── class-submissions-list-table.php # Admin submissions table
├── assets/
│ ├── css/
│ │ ├── admin.css # Admin styling
│ │ └── frontend.css # Frontend styling
│ └── js/
│ ├── admin.js # Admin JavaScript
│ └── frontend.js # Frontend JavaScript
└── templates/ # Template files
🛡️ Security Features
- Nonce Verification: All forms use WordPress nonces for CSRF protection
- Data Sanitization: All user input is properly sanitized
- SQL Injection Prevention: Prepared statements for all database queries
- Payment Security: PCI-compliant payment processing
- User Capability Checks: Proper permission checking for admin functions
🐛 Troubleshooting
Common Issues
- Form not displaying: Check if the form ID is correct and the form is published
- Payment not working: Verify API keys and webhook URLs are correct
- Styling issues: Check for CSS conflicts with your theme
- Webhook failures: Ensure your site has a valid SSL certificate
Debug Mode
Enable debug mode in SmartForms → Settings → General to see detailed error logs.
📝 Changelog
Version 1.0.0
- Initial release
- Drag-and-drop form builder
- Stripe and Razorpay integration
- Submission management
- REST API
- Gutenberg block support
🤝 Contributing
We welcome contributions! Please feel free to submit pull requests or report issues.
📄 License
This plugin is licensed under the GPL v2 or later.
🆘 Support
For support, please visit our documentation or contact our support team.
Made with ❤️ for the WordPress community