- Backup your
phpformbuilder
folder
- Replace your old
phpformbuilder
folder with the new one
- Copy your
[your-domain]/license.php
from your old installation to the new one
- Copy your
phpformbuilder/database/db-connect.php
from your old installation to the new one
- 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
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 sendMail function for complete features list.
/* OLD CODE V 2.x */
$from_email = '[email protected]';
$address = addslashes($_POST['user-email']);
$subject = 'phpformbuilder - Contact Form 1';
$filter_values = 'contact-form-1, submit-btn, token';
$sent_message = Form::sendMail($from_email, $address, $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'
);
$sent_message = Form::sendMail($email_config);
Changelog -
version 4.5 (05/2020)
New Features:
- add new "signature pad" plugin for electronic signatures (hand written signatures in forms)
- add new "litepicker" plugin (date / daterange picker)
- add new "date range picker" form in templates
- add new "license agreement" form in templates
- update the "car rental form" template with the new daterange picker plugin
- add "isHTML" + "textBody" options in sendMail() function
Drag and Drop form Builder:
- Choice of field widths (33%, 50%, 66%, 100%)
- possibility to group 2 fields on the same line (horizontal forms)
- choice of the icon library used and possibility to add and position icons on the input and button elements
- load / save the JSON forms on server as well as on disk
- drag and drop files from the "save on server" file browser
- save the JSON forms on server in subfolders
- add JSON forms templates in the JSON forms folder
Improvements:
- accessibility: add aria-label automatically for all fields that have a placeholder and no label text
- move the Bootstrap 4 error messages below the helper texts when inputs have addons (icons, ...)
- the drag and drop form builder will now throw an alert if the user leaves the page without having saved the changes
- disable browser autocompletion automatically for date, daterange and time pickers
- change the website search for a far better one
- change the website chat widget
Bug Fix:
- fix redirection after success in the drag and drop form builder
- fix a drag and drop form builder error in JSON with the intlTelInput plugin
- fix checkbox states memorization in the drag and drop form builder
- fix customer-satisfaction-step-form behaviour on window resizing
- fix missing quotes in JSON files for checkboxes in the drag and drop tool
- fix material-base.min.js JS console error
version 4.4 (03/2020)
New Features:
- New Drag & drop Form Builder
Improvements:
- auto-scroll to the 1st error when PHP validation failed after POST
- upgrade Bootstrap Select plugin to latest version
Bug Fix:
- fix undefined location.ancestorOrigins in Firefox
version 4.3.1 (12/2019)
Improvements:
Bug Fix:
- fix new recaptcha v3 async. loading issue
version 4.3 (09/2019)
Improvements:
- update the licensing system to allow registration on domain aliases
IMPORTANT: if you upgrade from a previous version you must first unregister your license,
then upload the new package and register again.
version 4.2.5 (02/2019)
Bug Fix:
- fix material pickers javascript errors
version 4.2.4 (06/2019)
Improvements:
- add security checks on file removal with the fileuploader plugin
- group security checks in a single readable file for the fileuploader plugin
version 4.2.3 (06/2019)
New Features:
- add dependent field example in switches-form.php templates
Improvements:
- Dependent fields now play nice with LCSwitch
Bug Fix:
- fix buggy LCSwitch events with Bootstrap 3
version 4.2.2 (05/2019)
New Features:
- add Visual Studio Code extension - https://marketplace.visualstudio.com/items?itemName=Miglisoft.phpformbuilder
- add Recaptcha V3 - https://www.phpformbuilder.pro/documentation/jquery-plugins.php#recaptchav3-example
- new "POST with Ajax" template available - https://www.phpformbuilder.pro/templates/bootstrap-4-forms/post-with-ajax-form.php
Improvements:
- update the fileuploader plugin to latest V2.2
- rebuild the phpformbuilder.pro website custom search engine
- Dependent fields selectors now accept any fieldnames & loop indexes
- update templates with latest Bootstrap 4 / jQuery / font awesome
- replace invisible Recaptcha with Recaptcha V3 in templates
- update Sublime Text plugin
Bug Fix:
- label sizing for Bootstrap 4
- main radio & checkbox label horizontal alignment with latest Bootstrap 4.3.1
version 4.2.1 (04/2019)
Improvements:
- add (very) strong protection for fileuploader plugin uploads
- live validator now auto-revalidate fields with Select2 & iCheck plugins on change event
Bug Fix:
- update pickadate plugin to latest (previous version was buggy with Chrome latest update)
- fix pickadate timepicker use with translation
version 4.2 (03/2019)
New Features:
- new function useLoadJs (https://github.com/muicss/loadjs):
$form->useLoadJs($bundle = '');
see https://www.phpformbuilder.pro/documentation/jquery-plugins.php#optimization-with-loadjs
Improvements:
- Prevent form submission while a file upload is in progress
- Misc minor improvements & code optimization
version 4.1 (03/2019)
New Features:
- add Tag Editor plugin for Ajax Search with Sortable Tags results
- add new search forms in templates with Ajax search & tags
- add Ajax search in jQuery plugins documentation
version 4.0.1 (02/2019)
Bug Fix:
- upgrade PHPMailer to latest 6.0.6 to fix PHP 7.3 warnings
version 4.0 (Major release - 12/2018)
New Features:
- new Material forms - use with Bootstrap 4 OR materialize framework as standalone
more informations: https://www.phpformbuilder.pro/documentation/class-doc.html#frameworks
- new material-datepicker plugin for Material forms + Bootstrap 4 forms
- add Select2 Material theme
- new setMode function
development mode loads the original plugin CSS & Javascript dependencies
production mode (default) compile & compress all the plugins CSS & Javascript dependencies
- new adAddon function to add button & text addons to input & select dropdowns
- add templates with addons examples: phpformbuilder/templates/[framework]/input-with-addons.php
- update jQuery Form Validation plugin to latest - now compatible with Foundation
- add jQuery Form Validation icons
- add jQuery Form Validation DEBUG mode
- update Bootstrap Select plugin to latest - now compatible with Bootstrap 4
Improvements:
- rewrite all the plugins configuration
now most plugins accept HTML5 data-attributes for easy configuration
- rewrite all website, documentation & code examples for Bootstrap 4
- change the website structure
now all the plugins have a dedicated page with code & examples
- remove the smtp option from sendMail function
now smtp is automatically enabled when $smtp_settings are filled.
- improve Ajax scripts loading (avoid browser console warning about deprecated Synchronous XMLHttpRequest on the main thread)
Bug Fix:
- solve plugins URL detection with paths containing uppercase letters
- update Emogrifier to latest version 2.0 (email inline css)
- edit phpformbuilder/mailer/phpmailer/extras/htmlfilter.php to remove php7 warning
- now ladda buttons have correct settings when using different ladda configurations simultaneously
Misc.:
- the default framework is now Bootstrap 4 (was previously Bootstrap 3)
- remove the old Material Design forms based on Bootstrap 3 + old version of Materialize
- remove the old ugly jQuery-ui datepicker
- remove the "pickadate material" config
- remove deprecated templates which used the deprecated jQuery File Upload plugin
- remove deprecated jQuery File Upload plugin
version 3.6.2 (08/2018)
Improvements:
- update server-side validation functions to accept empty values,
except for the validators whose internal logic make values required.
Details available here: https://www.phpformbuilder.pro/documentation/class-doc.html#php-validation-methods
Bug Fix:
- fix licensing system timeshift issue
- fix invalid feedback message with iCheck + bs4
- fix Ladda plugin behaviour with grouped buttons
version 3.6.1 (07/2018)
Improvements:
- improve html parsing
- disable onload live validation
- improve dynamic fields template 2 behaviour
- improve dependent fields selectors parsing with regex
Bug Fix:
- fix centered button groups with Foundation grid
version 3.6 (06/2018)
New Features:
- add required registration
- add LC-Switch plugin
Improvements:
- update documentation
- update PHPMailer to latest (6.0.5) - (wrong version numbers in src files, same issue in PHPMailer github)
version 3.5.2 (05/2018)
Improvements:
- Add support for PHP without mbstring extension
Bug Fix:
- recaptcha server-side validation errors now display correctly with bs4 (they where hidden by bs4's display:none css)
- fix server-side Recaptcha validation (which always returned true before)
- fix server-side validation errors markup inside input groups
version 3.5.1 (04/2018)
Bug Fix:
- fix live validation issue with invisible recaptcha
version 3.5 (04/2018)
New Features:
- switch Foundation forms to Foundation 6.4+
older versions are still available as 'foundation-float-grid' framework
doc: /documentation/class-doc.html#frameworks
- add Invisible Recaptcha plugin
replace all recaptcha v2 in templates with invisible recaptcha except with ajax forms & multiple modals
- add new "deferScripts" option to defer the loading of the plugins scripts
default value: true
Improvements:
- all scripts are now loaded with defer
- add code to reload uploaded files if forms are sent with errors in fileupload templates
Bug Fix:
- fix plugins loading with ajax and forms reloaded with errors
version 3.4 (04/2018)
IMPORTANT
This release includes a new fileuploader plugin with awesome new features.
The old fileupload plugin is now deprecated and will be removed in the next incoming version.
New Features:
- add new awesome fileuploader plugin including image crop/resize tools
Improvements:
- switched Bootstrap 4.0.0-beta.3 to 4.1
- improve plugins code if several forms are using the same selectors & same plugins
- Add Bootstrap 4 Form Validation (live jQuery) i18n support in phpformbuilder/plugins-config/formvalidation.xml
- Rewrite step forms code
Bug Fix:
- fix php 7.2 warning with email sending - Parameter must be an array or an object that implements Countable
- Formvalidation now works fine with intl-tel-input and i18n (custom languages)
- Email sending will no more fail with empty css file template
version 3.3 (12/2017)
New Features:
- add ajax option (easy Ajax loading to load the forms in any html file)
Plays well with any CMS (Wordpress, Joomla, Drupal, ...)
- add Documentation and screencast to use with CMS
- add Image Picker plugin
- add Image Picker Templates
Improvements:
- upgrade PHP Mailer to the latest version
- auto-filter token and submit buttons from email contents
Bug Fix:
- several minor fixes
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 "dependent 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