PHP Form Builder preview

Welcome to PHP Form Builder
PHP Form Class - Save tons of programming hours

  • 20+ jQuery plugins
  • 160+ Form Templates
  • Live validation
  • Server side validation
  • Email sending
  • customizable html/css email templates
  • Database recording
  • Bootstrap 4 Forms
  • Bootstrap 3 Forms
  • Material Design Forms
  • Foundation Forms
  • Contact Forms
  • Login Forms
  • Step Forms
  • Modal Forms
  • Popover Forms
  • Dynamic fields
  • Highly customizable layouts
  • Icons, tooltips & helpers
  • Date picker
  • Timepicker
  • Tinymce
  • Recaptcha
  • Bootstrap Select plugin
  • ICheck jQuery checkbox plugin
  • Conditional fields
  • Color picker
  • File uploader
  • ... and a lot more
Buy PHP Form Builder Now

favoriteLoved by 2000+ users

starstarstarstarstar 5 stars rating on Codecanyon (130+ ratings)

Overview

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

PHP Form Builder is ready to use with Bootstrap, Foundation and Material Design themes, but can be easily adapted for other frameworks or as standalone.
All you need is to match Form options with your framework.

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

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

For any question or request

Please

If you feel lost or have any trouble, please contact me before dropping any rating

  • I can build you a form for free, or for a small fee if your form is really complex
  • I can propose a refund if PHP Form Builder doesn't match what you intended

Build Bootstrap Forms

PHP Form Builder's default settings are Bootstrap ready.

PHP Form Builder is fully compatible with Both
Bootstrap 4 and Bootstrap 3.

Build Material Forms

Material forms are part of PHP Form Builder's package.
Switch from Bootstrap to Material with a single line of code.

Build Foundation Forms

Foundation now added to PHP Form Builder's package.

Build Standalone Forms

PHP Form Builder can adapt generated html to any framework,
or generate simple standard HTML5 elements.

120+ Form Templates

Each template is given with code you can easily copy / paste.
Code includes Live & Server side Validation and Email sending

Email Sending

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

Easy Contact Form

Shortcut function to build contact form in 2 minutes

Powerful jQuery plugins integration

Don't waste your time to include css & js files, generate js code, ...
PHP Form Builder will add any jQuery plugin in a very easy way and do all this job for you.

20+ jQuery plugins included

Best jQuery Form plugin included in 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 automagically scroll to user error if fields are not filled correctly.

Conditional logic

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

Special forms

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

- Fast & Efficient Professional Support -

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

About 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.

Please be fair: PHP Form Builder is a hard work and the licence is offered at the most affordable price possible

Standard license vs. extended license

  • If you use PHP Form Builder for a personal project or for a work (ie: website) sold to a single client, a standard license is sufficient.
  • If you include PHP Form Builder into a sold package (ie: theme, plugin) you must purchase an extended license and contact me to have my agreement.

Package Structure

PHP Form Builder's package includes the Form Builder itself, the documentation and all the 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 assets folder is not required if you don't use the styled email templates
  • The file-uploads folder is not required if you don't use the file-upload plugin or choose to upload your files elsewhere

The phpformbuilder folder structure

  • your-project-root
    • phpformbuilder Main form builder files including all the plugins
      • database Contains Mysql class. Not required if you have no database.
      • mailer Contains phpmailer class, the email templates and utilities to sanitize the emails contents 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.
      • Validator PHP Validation class.
      • 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.
      • server.php file used for debugging purpose if you encounter paths issues on your server.

Where to start ?

Depending on your php knowledge:

PHP Beginners

Beginners Guide
Tutorial for PHP beginners including full detailed explanations

PHP programmers

Quick start Guide
Quick and easy start with minimum required.

About functions and how to

Class documentation
Full class documentation.
How to ... ?
F.A.Q. with code examples to help with layout, icons, plugins, dependent fields and so on.
Functions reference
All functions & arguments.

Build a fully-working contact form in 2 minutes without any knowledge

Contact form in 2 minutes
If you don't want to learn, just want a working contact form.

Features

  • Form generation with complex layout capabilities (horizontal, vertical, inline)
    PHP Form Builder generates clean HTML5 markup, with separates functions to render form, generate CSS and JS code, so you can render them separately (generaly in <head> or just before </body>).

  • Bootstrap 4 Forms, Bootstrap 3 Forms, Material Design Forms, Compatible with any framework or can be used as Standalone.

  • Accepts any HTML5 form elements, including fieldsets, multiple selects, optgroups, button groups, ...

  • Allows to customize HTML with wrappers, IDs, classes and attributes, Javascript events, custom code almost anywhere.

  • Server-side validation can be done on any destination page ; errors are stored in session

  • Send your emails with simple or advanced function - detects and replaces posted values in default or custom html/css template. Uses PHPMailer and Emogrifier to inline css.

  • XSS / CSRF Protection

  • Database class included to easily prefill fields with values from your database, Insert/Update/Delete elements using posted values.

  • Numerous jQuery plugins included:

    Checkboxes & Selects

    Pickers

    Validation & Captcha

    Modal & Popover

    Uploaders

    Text Editors

    Others

    timepicker.xml
  • Memorization / recall of any custom configuration for each plugin

  • You can easily add any other external plugin (see plugins section).
    When you activate a plugin, the needed css and js files will be automaticaly added to your page.

  • Sublime-text 3 plugin available on Github

  • Bracket plugin available on Github

Themes

Bootstrap 3

Default'theme is Bootstrap 3.

All options are ready to use, and will generate all Bootstrap's markup and classes.

Bootstrap 4

Create your forms with Bootstrap 4 markup and classes.

Foundation

Create your forms with Foundation markup and classes.

Material Design

Material Design forms are based on Bootstrap 3.

Markup and options are exactly the same for both.

To switch from Bootstrap to Material Design, just add bootstrap-material-design plugin

Upgrade PHP Form Builder

Upgrade from V 2.x to V 3.x

More efficient & simple than ever, this release contains some code simplifications, new features and new syntax to send emails.

All V 2.x features are still available using old V 2.x syntax, except for email sending.

sendMail() and sendAdvancedMail() functions have been merged into a single sendMail() function (see details below)

 

Plugins path

No need to setup plugins path anymore (it's now automagically detected).
(phpformbuilder/plugins-path.php has been removed)

 

Server-side validation

No need to include Validator files
Required fields can now be validated automagically


    /* OLD CODE V 2.x */

    include_once rtrim($_SERVER['DOCUMENT_ROOT'], DIRECTORY_SEPARATOR) . '/phpformbuilder/Validator/Validator.php';
    include_once rtrim($_SERVER['DOCUMENT_ROOT'], DIRECTORY_SEPARATOR) . '/phpformbuilder/Validator/Exception.php';
    $validator = new Validator($_POST);
    $required = array('user-name', 'user-first-name', 'user-email', 'user-phone', 'message');
    foreach ($required as $required) {
        $validator->required()->validate($required);
    }
    $validator->maxLength(100)->validate('message');
    $validator->email()->validate('user-email');

    /* NEW CODE V 3.x */

    // create validator & auto-validate required fields
    $validator = Form::validate('contact-form-1');

    // additional validation
    $validator->maxLength(100)->validate('message');
    $validator->email()->validate('user-email');

 

Email sending

SendMail() function has now full capabilities to send attachments, add cc/bcc and a lot more.
See for complete features list.


    /* OLD CODE V 2.x */

    $from_email = '[email protected]';
    $adress = addslashes($_POST['user-email']);
    $subject = 'phpformbuilder - Contact Form 1';
    $filter_values = 'contact-form-1, submit-btn, token';
    $sent_message = Form::sendMail($from_email, $adress, $subject, $filter_values);

    /* NEW CODE V 3.x */

    $email_config = array(
        'sender_email'    => '[email protected]',
        'sender_name'     => 'PHP Form Builder',
        'recipient_email' => addslashes($_POST['user-email']),
        'subject'         => 'PHP Form Builder - Contact Form',
        'filter_values'   => 'contact-form-1, submit-btn, token'
    );
    $sent_message = Form::sendMail($email_config);

Changelog

version 3.2 (12/2017)


New Features:
        -   add Bootstrap 4 support
        -   add 40 Bootstrap 4 Templates
        -   add Select2 plugin - https://select2.github.io/
        -   add Ladda plugin - https://github.com/hakimel/Ladda
        -   add intl tel input plugin - https://github.com/jackocnr/intl-tel-input coupled with formvalidation
        -   add centerButtons(boolean) function
        -   add new options:
                buttonWrapper                   (element)
                centeredButtonWrapper           (element)
                centerButtons                   (boolean)
                verticalCheckboxLabelClass      (classname)
                verticalRadioLabelClass         (classname)
Improvements:
        -   upgrade all plugins to the latest version
        -   upgrade PHPMailer to latest 6.0 (required PHP 5.5+)
        -   improve documentation
        -   improve the use of several recaptchas on the same page
        -   reopen modal if the form has been posted with recaptcha error
        -   validate all generated code with Bootlint & W3C
            note: some of the included plugins (Bootstrap select, iCheck, jQuery file upload) generate Bootlint non-valid html
        -   add Russian and Ukrainian languages to the server Validator (thanks to Ramstud)
        -   update dynamic fields form 1 template with required dynamic fields and server + live validation
Bug Fix:
        - php warning with button group + label
        - php warning with inline forms

version 3.1 (07/2017)


New Features:
        - add $combine_and_compress argument to printIncludes() function to combine and minify all plugin dependancies (css & js files)
          (default: true) - details at https://www.phpformbuilder.pro/documentation/class-doc.html#printIncludes
        - add Foundation framework options and templates
        - add Nice Check plugin to style Radio buttons and Checkboxes
        - add templates theme switcher for Bootstrap & Material forms
Improvements:
        - auto combine and minify all plugin dependancies (css & js files)
        - make recaptcha fully responsive
        - allow to wrap radiobuttons with addInputWrapper function
        - switched setPluginsUrl() function to public and add "$forced_url = ''" optional argument to allow manual plugins URL configuration if user's server is misconfigured.
        - escaped commas now recognized in dependent fields (value with comma can be escaped)
        - rename "dependant fields" plugin to "dependent fields" (sorry ... confusion with French spelling ...)
Bug Fix:
        - fix issues with complex nested dependent fields and jQuery live validation
        - fix issue with custom class attribute and addCountrySelect function
        - fix issue with radio button attributes on material forms
        - fix css overflow with lists into dependent fields

version 3.0 (Major release - 05/2017)

IMPORTANT

More efficient & simple than ever, this release contains some code simplifications, new features and new syntax to send emails.
To upgrade from version 2.X, see Upgrade PHP Form Builder section.


New Features:
        - add static function Form::validate('form-id');
          Form::validate function instanciates validator and auto-validate required fields
        - merge sendAdvancedMail and sendMail function
        - add helperWrapper option
        - add addHelper($helper_text, $element_name) shorcut function
        - add "inverse" argument to Dependent fields
        - auto-disable dependent fields when they're hidden
        - add custom plugins config directory
        - public non-static methods can now be all chained
Improvements:
        - auto-locate plugins directory & url (phpformbuilder/plugins-path.php has been removed)
        - add optional $fieldset_attr & $legend_attr arguments to startFieldset() function
        - improved jQuery validation with Bootstrap collapsible panels
        - now up to 12 fields can be grouped into same container
        - add Validator Spanish language (Thanks Hugo)
        - minor performance improvements
Others:
        - add tooltip-form template
        - update templates according to new features
        - update documentation

Version 2.3 (02/2017)


    New Features:
        - add jQuery real time validation plugin ($50 value)
    Improvements:
        - better errors management on plugins path errors
        - add support for several recaptchas on same page
    Bug Fix:
        - removed crossOrigin warning using wordcharcount plugin
        - solved z-index issue with selectpicker & modal

Version 2.2.2 (01/2017)


    Improvements:
        - add support for several modal forms on same page
        - add support for several popover forms on same page
        - add several modal forms on same page templates (Bootstrap + material)
        - add several popover forms on same page templates (Bootstrap + material)
        - better errors management on plugins path errors
        - minor improvements in documentation

Version 2.2.1 (01/2017)


    Bug Fix:
        - add "phpformbuilder/mailer/phpmailer/extras" folder to package, missing in previous release

Version 2.2 (01/2017)


    Security:
        - update PHP Mailer Class to latest (5.2.21)
    Improvements:
        - auto-trigger dependent fields on form load
        - improve main form attributes compilation
    Bug Fix:
        - add one missing translation in de
        - remove php warning on selects with no option
        - fix missing line breaks in emails

Version 2.1 (10/2016)


    New Features:
        - add Recaptcha plugin
        - update Fileupload plugin to latest version
        - add new template default-db-values-form.php
        - add new template fileupload-test-form.php
        - add default values [from database|from variables] in 'how-to' documentation
        - add a 4th optional argument to group 4 inputs in same wrapper
    Bug Fix:
        - missing required sign with radio and no classname

Version 2.0.3 (08/2016)


    Improvements:
        - Rewritten Dynamic Fields Template javascript to match any field
        - update sendAdvancedMail() function to automagically convert posted arrays to comma separated lists in email

Version 2.0.2 (08/2016)


    Bug Fix:
        - fix dependent select with checkboxes
        - fix custom attributes with checkbox groups

Version 2.0.1 (08/2016)


    Improvements:
        - Add Dynamic Fields Templates
    Bug Fix:
        - fix php7 warning (upload button not shown) using addFileUpload() function

version 2.0 (Major release - 07/2016)

IMPORTANT

All features are backward-compatible, except addCheckbox() function: 3rd argument ($name) has been removed.

  • Previous versions: $form->addCheckbox($group_name, $label, $name, $value, $attr = '');
  • New version 2.0: $form->addCheckbox($group_name, $label, $value, $attr = '');

(see examples or main class doc for more informations).


    New Features:
        - add Material Design plugin
        - add Material Design templates
        - add Modal plugin
        - add Popover plugin
        - add Pickadate plugin + Pickadate Material
        - add XSS protection
        - add CSRF protection
                (documentation: https://phpformbuilder.pro/documentation/class-doc/index.html#security)
        - add 2 functions for dependent fields:
                -   startDependentFields($parent_field, $show_values) ;
                -   endDependentFields();
        - add Autocomplete plugin
        - add support for input grouped with button (ie: search input + btn)
        - automatic scroll to first field with error
        - add third argument to render function to allow returning form code instead of echo
    Improvements:
        - restructure package
        - rewrite all documentation
        - add php beginner's guide
        - rewrite & optimize several Form functions
        - better error fields rendering for grouped fields
        - zero value will not be anymore considered as empty
        - checkboxes are automagically converted to an array of indexed values.
        - add new argument to render, printJsCode & printIncludes functions to return code instead of echo.
        - beautify output if debug enabled
    Updates:
        - update Bootstrap Select plugin to latest version (v1.10.0)
    Bug Fix:
        - fix validation custom error message with 'between' function
        - fix validation errors with dates + hasSymbol function
        - fix wrong comma added in some cases with select option attr.

Version 1.3.1 (10/2015)


    Bug Fix:
    - fix reply_to issue in sendAdvancedMail function

Version 1.3 (05/2015)


    Improvement:
        - improve register / clear system
    New Features:
        - add Country select plugin
        - add Bootstrap select plugin
        - add Passfield plugin
        - add Icheck plugin

Version 1.2.7 (03/2015)


    Bug Fix:
        - fix word-char-count plugin used on the same page with tinyMce + word-char-count.

Version 1.2.6 (03/2015)


    Improvement:
        - register array fieldnames in session to keep values when validation fails.

Version 1.2.5 (02/2015)


    Improvement:
        - add word-char-count support with tinyMce

Version 1.2.4 (12/2014)


    New Features:
        - add support for select into input groups
    Improvements:
        - input groups documentation & examples fully detailed

Version 1.2.3 (12/2014)


    New Features:
        - add database utilities with Myql class
        - add tinyMce (Rich Text Editor) plugin with responsivefilemanager
    Improvements:
        - add debug argument to print css/js includes & js code on screen
        - support of multiple fileUploads on the same page

Version 1.2.2 (10/2014)


    New Feature:
        - add word / character count plugin
    Bug Fix:
        - Fix object context error with php < 5.4
    

Version 1.2.1 (10/2014)


    Updates:
        - improve email sending with attached files

Version 1.2 (10/2014)


    New Features:
        - add sendMail function
        - add sendAdvancedMail function
        - add groupInputs function
        - add btnGroupClass option

    Updates:
        - update fileUpload plugin to last version

    Bugs Fixes:
        - Fix default checkbox wrapper html
        - Fix plugin path with only fileUploads

Version 1.1 (09/2014)


        Bugs Fixes:
        - Fix Validator compatibility with 32/64 bit systems
        - Fix object context error with php < 5.4

Version 1.0 (09/2014)


        PSR2 Standard support
        Check for security vulnerabilities
        Add documentation

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 are allowed to use it without limitation for non-commercial projects.

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

 

About the author

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

I spend time each day helping people using PHP Form Builder all over the world

Feel free to contact me about any project / request


Other web tools sold on Codecanyon:

Slider Maker - jQuery slideshow builder

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

TinyMce Bootstrap plugin

Bootstrap toolbar for tinyMce
TinyMce plugin to insert Bootstrap elements into your page
Wordpress & Joomla versions available

Other projects:

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