Welcome to PHP Form Builder
PHP Form Generator - HTML/PHP form design made easy

Bootstrap 4Bootstrap 4 Bootstrap 5Bootstrap 5 BulmaBulma FoundationFoundation Material designMaterial design TailwindTailwind UIKitUIKit

PHP Form Builder is a complete library based on a PHP class. It allows you to program and layout all types of PHP/HTML forms using the Drag & Drop Form Builder or the built-in PHP functions.

PHP Form Builder preview

PHP Form Builder is conceived for use with the most popular frameworks: Bootstrap 4, Bootstrap 5, Bulma, Foundation, Material Design, Tailwind CSS, and UIKit.

If you use another framework, the configuration options will allow you to generate the appropriate HTML code.

If none of the available frameworks powers your website, we provide a minimal version of Bootstrap 5 CSS to design your forms.

It allows you to build any form from scratch or by customizing one of the 120+ templates provided

Optimized for high-speed loading and maximum security.

Loved by 5300+ users

5 stars rating on Codecanyon (230+ ratings)

Buy PHP Form Builder Now

Customer Reviews on Google

Why would you need PHP Form Builder?

PHP Form Builder is a simple but powerful tool with which you can create complex forms easily.

PHP Form Builder is ready to use with Bootstrap 4, Bootstrap 5, Bulma, Foundation Material Design, Tailwind & UIKit. You can quickly adapt it for other frameworks or standalone.

Creating forms is a complex and tedious task, even more so if you care about the user experience.
Below is a summary of how PHP Form Builder can help you.

PHP Form Builder:

Documentation is well-adapted for all types of users: PHP beginners as well as confirmed programmers.

Is PHP Form Builder suitable for you?

PHP Form Builder is perfect for creating all types of forms in any situation:

Please see the Where to start? section to find the best place to start depending on your skills.


PHP Form Builder at a glance

Frameworks

PHP Form Builder is designed for the most popular frameworks.

No framework

Create your forms in any context with the minimal version of Bootstrap 5 CSS provided.

Drag & Drop

Create your forms without programming using the drag & drop form builder.

300+ Form Templates

Each template is provided with the PHP source code.
Code includes Live & Server-side Validation and Email sending

Email Sending

Built-in function to send posted values easily.
Support for attachments and Custom Email templates

Powerful plugins integration

Don't waste your time including CSS & JS files and writing your JS code.
PHP Form Builder will easily add any JavaScript plugin and do all this job for you.

30+ JavaScript plugins included

Best JavaScript Form plugin included in the package and ready to use to enhance your forms with file uploader, custom radio, checkboxes, select, pickers (date, time, color), captcha, ...

Maximum Security

Automatic XSS and CSRF protection - maximum level security

Server-side validation

Validate any field with any condition.
Your page will automatically scroll to user error if fields are not filled correctly.

Conditional logic

Show / Hide fields depending on the user's choices
One easy function for all logic. Conditional fields can be nested.

Special forms

Ajax forms, Step forms, Modal forms, Popover forms, and Accordion forms: Simple and easy integration with templates and complete documentation.

Professional Support

We care for each customer and do our best to give efficient help.

Where to start?

Depending on your preferences:

Quick and easy form building

Drag & Drop
Form Generator
You'll just have to drag and drop the form elements, choose your settings then paste the generated code.

PHP Beginners

Beginners Guide
Tutorial for PHP beginners including full detailed explanations

PHP Programmers

Quickstart Guide
Quick and easy start with minimum required.

About functions and how to

Class documentation
Full class documentation.
Code Samples
FAQ with code examples to help with layout, icons, plugins, dependent fields, etc.
Functions reference
All functions & arguments.

Package Structure

PHP Form Builder's package includes the Form Builder itself, the documentation, and hundreds of templates.

You don't have to upload all the files and folders on your production server.

Documentation and Templates are available online at https://www.phpformbuilder.pro/.
There's no need to upload them on your production server.

You only have to upload the following directories on your server:

The phpformbuilder folder structure

  • your-project-root
    • phpformbuilder Main form builder files, including all the plugins
      • database Contains the DB class. It is not required if you have no database.
      • mailer Contains PHPMailer class, the email templates, and utilities to sanitize the contents of the emails and inline the emails' CSS.
      • plugins Contains all the plugins. You can remove the ones you don't use in your forms.
      • plugins-config Contains all the plugins' configuration files ("domready" codes stored into XML files). You can remove the ones you don't use in your forms.
      • plugins-config-custom Empty folder to store your plugin configurations files if you customize.
      • traits Separate parts (PHP traits) of the main class.
      • Validator PHP Validation class.
      • curl-test.php Test your PHP cUrl functionality.
      • Form.php PHP Form Builder's main class.
      • FormatHtml.php PHP Class to beautify HTML output code
      • FormExtended.php Extends PHP Form Builder's main class with useful shortcut functions.
      • register.php required to register & activate your PHP Form Builder copy.
      • server.php file used for debugging purposes if you encounter paths issues on your server.

Features

Themes (Frameworks)

All options are ready to use and will generate HTML markup according to the chosen framework.

The default framework is Bootstrap 5.

If none of the available frameworks powers your website,
PHP Form Builder provides a minimal version of Bootstrap 5 CSS to design your forms.

Bootstrap 4

$form = new Form('my-form', 'horizontal', 'novalidate', 'bs4');

Bootstrap 5 Default

$form = new Form('my-form', 'horizontal', 'novalidate');

Bulma

$form = new Form('my-form', 'horizontal', 'novalidate', 'bulma');

Foundation - v6.4 or higher, with XY grid

$form = new Form('my-form', 'horizontal', 'novalidate', 'foundation');

Material Design

Material Design forms are built with Materialize framework.

You can design your forms with the Material framework both on pages built with Materialize and with Bootstrap 4.

Tailwind

$form = new Form('my-form', 'horizontal', 'novalidate', 'tailwind');

UIKit

$form = new Form('my-form', 'horizontal', 'novalidate', 'uikit');

No framework

Add the minimal Bootstrap 5 CSS to your page head, then you can build your forms with Bootstrap 5.

This style sheet only includes what is necessary to layout your responsive forms and will not break anything in the other parts of your pages.

<head>
    // link to the minimal Bootstrap 5 CSS
    <link rel="stylesheet" href="/phpformbuilder/templates/assets/bootstrap5-phpfb/css/bootstrap5-phpfb.min.css">
</head>
<?php
// Then you can build your form
$form = new Form('my-form', 'horizontal', 'novalidate');

More details about __construct() here: Main functions > General > Construct

License and Registration

License

1 License = 1 project

If you want to use PHP Form Builder on several websites, you've got to buy a new license for each one.

Standard license vs. extended license

Registration

Before using PHP Form Builder, you must register your copy.

Registration is for a lifetime & just has to be done once for each installation (localhost/production server).

To unregister/register again with another hostname/URL:

  1. open phpformbuilder/register.php to unregister your copy
  2. move your folders where you want to
  3. open phpformbuilder/register.php to record your new path

Upgrade PHP Form Builder

  1. Backup your phpformbuilder folder
  2. Replace your old phpformbuilder folder with the new one
  3. Copy your [your-domain]/license.php from your old installation to the new one
  4. Copy your phpformbuilder/database/db-connect.php from your old installation to the new one
  5. If you customized the following files/folders, copy them from your old installation to the new one:
    • phpformbuilder/mailer/email-templates-custom
    • phpformbuilder/plugins-config-custom
    • phpformbuilder/FormExtended.php

Visual Studio Code extension

PHP Form Builder Visual Studio Code extension is available on Visual Studio Code Marketplace

The extension adds auto-completion for all Form Builder functions.

PHP Form Builder Visual Studio Code Completions

Sublime Text plugin

PHP Form Builder Sublime Text plugin is available on Package Control

The plugin adds auto-completion for all Form Builder functions.

PHP Form Builder Sublime Text Completions

Changelog

This changelog is for the current Major version 5 only.

The previous versions' changelog is available here in the help center.

version 5.3 (01/2024)


New Features:
    - add the code for Recaptcha to be properly loaded in Ajax forms
Improvements:
    - add php type hinting and enable PHP strict_types
    - fix PHP 8.3 deprecation warnings
    - review PHP Standard compliance with PHPCS and PHPCBS - Standard:PHPCompatibility 7.4-8.3
    - add SQL group_by clause in DB->select() '$extras' argument
    - update the Signature Pad plugin to the latest version (v4.1.6)
    - add the 'data-height' attribute to the Signature Pad input
Bug Fix:
    - repair the database getLastInsertId() function
    - fix "update" queries using the same fieldname in both values and where clause
    - fix Deprecated error in class.fileuploader.php

version 5.2.1 (01/2023)


New Features:
    - Support of different RDBMS with PDO drivers (MySQL/MariaDB, Oracle, PostgreSQL, Firebird)
    - add new functions to the database PDO wrapper: https://www.phpformbuilder.pro/documentation/php-pdo-database-class.php
Improvements:
    - Improve Dependent fields events management & performance
    - handle required fields validation inside nested dependent fields
Bug Fix:
    - The events on inputs with the Pretty checkbox plugin enabled will now work as expected
    - update the Passfield plugin to solve a Popover bug with the latest Bootstrap
    - memorization of the 'inline' checkbox/radio value in the drag & drop form builder

version 5.2 (10/2022)


New Features:
    - add new functions to the database PDO wrapper: https://www.phpformbuilder.pro/documentation/php-pdo-database-class.php
    - add the "limit" argument to the "select" function of the database PDO wrapper
    - add the getOptions() function to show the list of the current options (or single/multiple options values)
Improvements:
    - add the "utf-8" charset in the DB connection settings
    - upgrade the Slimselect plugin to the latest version v1.27.1
Bug Fix:
    - Dependent fields will not be posted anymore when they're hidden
    - fix the broken links in the index.html if the Codecanyon package

version 5.1 (07/2022)


New Features:
    - add ability to copy (duplicate) fields in the Drag and Drop form builder
Improvements:
    - add max-height + vertical scrollbars to the Drag and Drop form builder
    - disable the hcaptcha's recaptcha compat option
    - update the template's ajax-loaded-multiple-forms
    - update the Select2 plugin to its latest version 4.1.0-rc.0
Bug Fix:
    - edit the intltelinput Javascript to set the full phone value in real time (was buggy since the last plugin upgrade)
    - fix formValidation plugin not revalidating after removing file with fileuploader when upload limit is set to 1

version 5.0.6 (03/2022)


New Features:
    - ability to center the HCaptchas with the Drag & Drop
Improvements:
    - add a "no action" option in the drag & drop for the form action after validation
    - add a regexp and helper text to validate the components names entered by the user in the Drag & Drop
Bug Fix:
    - fix use of array_key_last with php < 7.3
    - fix formvalidation code for Tinymce required fields
    - remove Tinymce from the compiled Javascript to avoid 404 errors on Tinymce dependencies

version 5.0.5 (03/2022)


Improvements:
    - show the warning message on file uploader failure
    - add a warning message in the drag & drop on database update if no field has been specified in the WHERE clause
    - show the HTML code in the drag & drop HTML components
    - add "copy" buttons to all the code blocks in drag & drop and documentation
Bug Fix:
    - fix paths of the file uploader email attachments generated by the drag & drop form builder
    - fix and improve the plugins loading system after POST with Ajax
    - fix the database insert code generated by the drag & drop
    - fix the database update code generated by the drag & drop
    - fix script loading & triggering issues with Ajax

version 5.0.4 (03/2022)


Improvements:
    - Improve the drag & drop layout
Bug Fix:
    - fix the File uploader code with drag & drop and Ajax

version 5.0.3 (03/2022)


Improvements:
    - add instructions for CMS users in the Quickstart Guide
    - remove Typography CSS from the custom minimal Bootstrap 5 CSS version (templates/assets/bootstrap5-phpfb)
    - replace the jQuery code generated by the Drag & drop form builder with a clean Vanilla JavaScript code
Bug Fix:
    - replace a stupid white text on white background in the drag & drop form code modal
    - edit the LCSwitch plugin to make it work with inputs inside labels
    - add the Materialize base JavaScript, which was missing when loading forms with Ajax

version 5.0.2 (03/2022)


Bug Fix:
    - solve a bug with the file uploader & images

version 5.0.1 (03/2022)


New Features:
Improvements:
    - add instructions for CMS users in the Quickstart Guide
Bug Fix:
    - replace a stupid white text on white background in the drag & drop form code modal
    - edit the LCSwitch plugin to make it work with inputs inside labels

version 5.0 - Major update (03/2022)


- upgrade to Bootstrap 5
- remove jQuery except for the plugins that require it
- add Bulma configuration & templates
- add Tailwind configuration & templates
Plugins:
    - update all the plugins to their latest version
    - rewrite all the jQuery instantiation codes in Vanilla JS for all non-jQuery plugins (in plugins-config/*.xml files)
    - add a new Accordion plugin for accordion step forms
    - replace jQuery autocomplete by autoComplete.js (vanilla js)
    - replace jQuery captcha (realPerson) by js-captcha (vanilla js)
    - add jsCaptcha server-side validation
    - add hCaptcha plugin
    - remove the old recaptcha v2 plugin
    - replace the jQuery-Color-Picker by a new colorpicker plugin (vanilla js)
    - rewrite the Dependent Fields jQuery plugin in vanilla js
    - replace the modal plugin by a new lightweight accessible vanilla js modal plugin
    - rewrite the Nice Check jQuery plugin in vanilla js
    - replace the Popover and jQuery Tooltip plugin with the amazing vanilla js TippyJs
    - activate plugins with data-attributes instead of classnames to avoid conflicts. ie: 'data-input-spinner=true' instead of 'class=input-spinner'
    - update & rewrite the lcSwitch JavaScript & replace themes by data-attributes (data-oncolor and data-oncss)
    - improve the website accessibility with the new excellent Chrome CSS Overview tool
    - remove the "dist" folders in the plugins folders and move the files directly in thir parent folder
    - update Bootswatch themes and add them to the Bootstrap 4 + Bootstrap 5 templates
Functions & code:
    - replace the MySQL class with the PDO version (https://www.phpclasses.org/package/10844-PHP-Access-MySQL-databases-using-the-PDO-extension.html)
    - add a new addheading() method
    - add a new buildAlert() static method
    - add a new addTimeSelect() method
    - remove the unused 'type' argument in addFileUpload() function
    - improve the 'sent_message' option behaviour in the sendMail() method
    - replace the centerButtons() function with the new centerContent() function
    - rename the groupInputs() function by groupElements() for a better consistency
    - remove the form inline layout - use horizontzal with grouped fields instead
    - split the Form class into PHP Traits to improve the readability of the code and to group the functions in a logical way
    - lint code with PHPCS & Sonarlint
Templates:
    - add new templates for each framework
    - replace All the jQuery code with Vanilla JS code
    - replace the complex "email-styles" form with a basic "email-templates" form - easier to understand
Drag & drop:
    - Complete update with integration of new frameworks, plugins and features
    

Sources & Credits

Thanks so much to:

About Responsive File Manager

Responsive File Manager is under Creative Commons Attribution-NonCommercial 3.0 Unported License.
The author kindly allowed me to include it with PHP Form Builder.
PHP Form Builder users can use it without limitation for non-commercial projects.

If you want to use Responsive File Manager in commercial projects, don't hesitate to contact the author and ask him for his agreement. A small donation is welcome.

 

About

I'm a french web developer; I work on many enthusiastic projects for clients as a freelancer, mainly handmade websites or web applications.

I spend time every day helping people using PHP Form Builder worldwide.

Feel free to contact me about any project/request


Others works

PHP CRUD Generator

PHP CRUD Generator
PHP CRUD Generator
Simple application to build Bootstrap backoffice for your website

Slider Maker

jQuery Slideshow builder
How to build jQuery slideshows & galleries without coding
Login to the admin panel and create high-quality, responsive slideshows in a visual way

TinyMce Bootstrap plugin

Bootstrap toolbar for tinyMce
TinyMce plugin to insert Bootstrap elements into your page

DMCA Sender - Anti-Piracy solution

DMCA Sender - Anti-Piracy solution
DMCA Sender - Online SaaS application to find illegal download links to your softwares & applications.
Auto-send your DMCA Takedown Notice

Subscribe to our mailing list
Keep informed of the latest updates - maximum 2 or 3 posts per year

* indicates required