Installation error
If you see the message "An error occurred during the registration process.", or any PHP error, or white page:
You just have to enable PHP CURL extension.
Restart your php server, then the installer will work.
To help you we need to understand and be able to reproduce your problem.
PHP Form Builder doesn't have any known bugs so far, and the problems encountered are mostly due to the configuration of your server, or other parameters related to your project.
This is why it is essential to provide us with all the information we may need:
So please contact us and send us the necessary information, we will do our best to help you quickly and efficiently.
If you refuse for any reason to give us the necessary information, we may not be able to help you effectively. In this case, no refund request will be accepted, except in special cases.
If your problem isn't solved:
1 license = 1 domain + any subdomain
When you register 2 things are done:
That's why you need to register both on your localhost & prod. server.
PHP Form Builder is checking your registration in 2 different ways:
A basic verification is done each time you load a form, using your license.php
This one generates the ugly danger message if something's wrong.
The real strong verification is done once a week or month on the licensing server
If you pass the verification 1 time (post your form successfully) you can be 100% sure that all is definitely ok.
Both will accept any subdomain, but you can't use different domain names extensions.
This means that you have to buy a license for domain.xxx & another one for domain.yyy
& register both with their purchase number.
You can then use any subdomain on both.
If you see the message "An error occurred during the registration process.", or any PHP error, or white page:
You just have to enable PHP CURL extension.
Restart your php server, then the installer will work.
You entered your purchase code with a trailing space.
This error occurs if you registered your license with a different URL (http/https, www or without www) than the one you use to access your page.
The solution is to always use the same URL, for instance https://www.your-domain.com
. Regardless of PHP Form Builder, it is a good practice to adopt, which will also improve your SEO.
A Regular license allows 2 installations - 1 for your localhost & the other for production server.
If you want to change the installation URL (domain, folder, ...) you have first to uninstall PHP Form Builder from your initial URL, then reinstall on the new one.
To uninstall PHP Form Builder:
If for any reason you can't unregister your copy & want to reinstall, please contact me,
send me your purchase code & delete phpformbuilder/[your-domain]/license.php from your server.
I'll remove your installation license from the server then you'll be able to reinstall elsewhere.
If your page is absolutely white or returns "HTTP ERROR 500" it means you have a php error.
To display error message, you have to enable php display errors.
<?php
use phpformbuilder\Form;
use phpformbuilder\Validator\Validator;
// add the line below to your code :
ini_set('display_errors', 1);
If the ini_set() function does not work on your server, you have to turn display_errors On in your php.ini
PHP Form Builder requires a single file, which is called using php include_once() function :
<?php
include_once rtrim($_SERVER['DOCUMENT_ROOT'], DIRECTORY_SEPARATOR) . '/phpformbuilder/Form.php';
If the path to file inside parenthesis is wrong, file is not found.
You've got to find the right path leading to your phpformbuilder directory.
OR Try one of the followings, depending on your situation :
<?php
// replace "your-dir" with yours in the following line
include_once rtrim($_SERVER['DOCUMENT_ROOT'], DIRECTORY_SEPARATOR) . '/your-dir/phpformbuilder/Form.php';
<?php
// with a structure like :
// contact-form.php
// phpformbuilder/Form.php
include_once 'phpformbuilder/Form.php';
// with a structure like :
// subfolder/contact-form.php
// phpformbuilder/Form.php
include_once '../phpformbuilder/Form.php';
See Warning: include_once([...]) (same error, same solution)
PHP Form Builder uses the PHP mb_string extension to send emails with the correct encoding.
PHP mb_string extension allows to work with multi-bytes encoding (UTF-8, ...).
PHP mb_string extension is not a default PHP extension, but is enabled on most servers.
If it's not enabled on yours, you've got 2 solutions:
$charset = mb_detect_encoding($mergedHtml);
with:
charset = 'iso-8859-1';
if (function_exists('mb_detect_encoding')) {
$charset = mb_detect_encoding($mergedHtml);
}
You'll find your version number in comments at the beginning of phpformbuilder/Form.phpOpen your browser's console (instructions here)
You have to solve all errors you see in console. Errors probably come from your page content, not from phpformbuilder itself.
Be sure you include first jQuery, THEN Bootstrap js, THEN phpformbuilder plugins code :
<!-- jQuery -->
<script src="//code.jquery.com/jquery.js"></script>
<!-- Bootstrap JavaScript -->
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<?php
$form->printIncludes('js');
$form->printJsCode();
?>
PHP Form Builder is optimized for fast loading.
This means that all the required plugins files (CSS & Javascript) are automatically minified & concacenated.
When you make changes to the form these files are automatically regenerated.
The minified/concatendated files are located in phpformbuilder/plugins/min/[css|js]
You can always safely remove the css & js files located in these 2 folders.
They'll be regenerated and refreshed, this can in some cases solve cache issues.
When you're in development, you can call the unminified unconcatenated files this way:
// This will load the unminified unconcatenated files
$form->setMode('development');
In a few cases, your server may not be correctly configured. Consequence is that the plugins URLs are wrong.
Solution is to set the URL to plugins directory manually:
// Set URL to match your plugins directory
$form->setPluginsUrl('http://phpformbuilder/plugins/');
Included templates use a custom version of Bootstrap's css. You'll find it in phpformbuilder/templates/assets/stylesheets/bootstrap.min.css
.
Set the correct path from your form to this css :
<!-- Bootstrap CSS - Change path with your own -->
<link href="assets/assets/css/bootstrap.min.css" rel="stylesheet">
... Or replace with Bootstrap CDN :
<!-- Bootstrap CSS CDN -->
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
jQuery validation plugin is complex and can have unexpected behaviors if it encounters configuration issues or malformed html.
To solve this :
console.log
(un-comment) to find out what's going on