// backend password
private $backend_password = "ezfc";
// database config
public $hostname = "localhost";
public $username = "root";
private $password = "";
public $dbname = "ezfc_php";
public $prefix = "ezfcphp_";
// plugin base url - make sure to add a trailing / at the end
// example: $plugin_url = "http://www.your-website.com/ezfc-php/";
public $plugin_url = "http://localhost/ezPlugins/ezfc-php/";
After the installation was successful, you should see a new section labeled “ez Form Calculator” in the control panel.
Forms are being added via templates. The default template is blank. In future, more and more templates will be added by default.
Make sure you choose “blank” to create an empty form and click on “add by template” to proceed.
You should now see that a new form has been added:
Now, you can add elements as you please. Elements are displayed on the right side. Simply click on an element to add it to your current form.
After the element has been added, click on the item to show more element options. See the Element Options section for further details.
Name: For internal use only.
Label: This text will be displayed to the user as well as in emails.
Required: If this options is checked, the user has to fill out this field before submitting.
Calculate_enabled: When checked, this field will be taken into calculations. If not, this field is just a basic input field (e.g. email, name etc.).
Factor: Input value will be multiplied by the factor, e.g: factor value is 5 and the user value is 2 –> 5*2 = 10.
Min: Minimum value.
Max: Maximum value.
Calculate: The first of two fields is the operator (add, subtract, multiply and divide), the second field is the value to operate with.
Placeholder: This text will be shown as a placeholder value only.
Class: You can add a css-class manually this way.
When a new entry was added, this recipient will receive a new mail immediately. Leave blank if you do not want to receive any email notifications.
This text will be displayed when a form has been submitted.
Spam protection in seconds
Every x seconds, a user (identified by IP address) can submit a form.
Show required char
Whether a notification about required fields should be shown or not.
Pretty obvious, isn’t it?
Captcha public key / private key
This script uses Googles Recaptcha plugin. You would need a public as well as a private key in order to make it work. Used for spam prevention.
Only check this option when you are totally sure to overwrite ALL EXISTING FORM SETTINGS.
Check out the file index.php in the directory ezfc-php-example. It is essential to do the following steps:
Put the following lines at the start of the page:
$ezfc_config = new Ezfc_config();
$ezfc_frontend = new Ezfc_frontend($ezfc_config);
This will load the config and the frontend script. Place the following line right before the closing <head>-tag:
<?php $ezfc_frontend->get_header(); ?>
This will load all relevant CSS styles. In order to dislay a form, write the following line anywhere between the header and the footer:
<?php echo $ezfc_frontend->get_output(1); ?>
Where the first argument is the form id (1 in this example). Additionally, write the following line right before the closing-tag:
<?php $ezfc_frontend->get_footer(); ?>