WordPress.org

Plugin Directory

Calculated Fields Form

Calculated Fields Form is a plugin for creating forms with dynamically calculated fields and display the result.

Q: Is the "Calculated Fields Form" plugin compatible with "Autoptimize"?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q214

Q: What means each field in the Calculated Fields Form settings area?

A: The Calculated Fields Form's page contains detailed information about each field and customization:

http://wordpress.dwbooster.com/forms/calculated-fields-form

Q: Where can I publish a calculated fields form?

A: You can publish the forms into pages and posts. The shortcode can be also placed into the template. Other versions of the plugin also allow publishing it as a widget.

Q: Can I create global variables to be used in the equations?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q199

Q: Is the form processing an option, for example, to email the form data and calculated results?

A: The form processing isn't available in the version listed on this directory. There are other versions with form processing, email notifications and payment processing. You can check other versions at http://wordpress.dwbooster.com/forms/calculated-fields-form

Q: Which calculation operations are included?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q216

Q: How can I round the calculated result to 2 decimal digits?

A: Use the "PREC" function/operator for that purpose, example:

PREC(fieldname4*fieldname5,2)

The above sample rounds the result of fieldname4*fieldname5 to two decimal digits.

Q: Which are the operations with date values that the plugin allows?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q217

Q: Are there financial operations included in the plugin?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q218

Q: How calculate an amortization?

A: The CALCULATEAMORTIZATION is the operation with most complexity in the "Calculated Fields Form" and requires its own section. Please, visit the following link to read a detailed description about the use of CALCULATEAMORTIZATION operation:

http://wordpress.dwbooster.com/faq/calculated-fields-form#q219

Q: How to define an initial date in a date field?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q220

Q: How to change the language on datepicker?

A: To use a different language on datepickers will be needed create an additional file and touch some code. Please, visit the following link to read the instructions:

http://wordpress.dwbooster.com/faq/calculated-fields-form#q221

Q: Is there a way to format the form in a table structure (various fields in the same line) ?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q66

Q: How to convert a common button in a submit button?

A: To convert a common button in a submit button, simply assigns, as part of the onclick event, the snippet of code:

    jQuery(this).closest('form').submit();      

Note: this option is only compatible with the pro and developer versions of the plugin

Q: How to display an image in a checkbox or radio button?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q222

Additionally, to hide the checkboxes and radio buttons, and use only the images for choices selection, open the "/wp-content/plugins/calculated-fields-form/css/stylepublic.css" file in the text editor your choice, and paste the following styles definition at the end of file's content:

    #fbuilder input[type="radio"],      
    #fbuilder input[type="checkbox"]{display:none !important;}      

Q: How to insert an image in the notification emails?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q223

Q: How to replace the image displayed in a Media Field, in function of choice selected in a radio buttons field?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q266

Q: How to insert changes of lines in the notification emails, when the HTML format is selected?

A: If you are using the HTML format in the notification emails, you should insert the BR tags for the changes of lines in the emails content:

<BR />

Q: In which order are "calculated" the fields?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q79

Q: Can I link the calculated amount to a PayPal payment form?

A: That feature is available in the pro version that can be acquired at this page http://wordpress.dwbooster.com/forms/calculated-fields-form

Q: Non-latin characters aren't being displayed in the calculator form. There is a workaround?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q225

Q: The calculated form doesn't appear in the public website. Solution?

A: In the "throubleshoot area" (located below the list of forms in the settings area) change the "Script load method" from "Classic" to "Direct".

Q: How to create multi-page forms?

A: Use the "Page Break" field on the form builder to indicate the new pages on the form.

Q: How to display the selected values in the slider control?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q228

Q: How to display a summary of entered data in the form?

A: Insert a summary control and select the fields to be displayed on summary.

Q: How to highlight the fields in the summary control?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q229

Q: Could be displayed a summary of submitted fields in the thank you page?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q230

Q: How can I apply CSS styles to the form fields?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q234

Q: Is possible modify any of predefined templates included with the plugin?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q231

Q: How to create a new template to use with my forms?

A: http://blog.net-factor.com/how-to-create-a-new-template-to-use-with-my-forms/

Q: How to hide the fields on forms?

A: http://wordpress.dwbooster.com/faq/calculated-fields-form#q232

Q: Why after assign some of class names: column2, column3, or column4, to a group of fields, the field that follow the group is displayed displaced at right?

A: If that occur, I recommend to insert a DIV field, immediately after the group of fields, and assign the class name: clear, to the DIV field. The "clear" class is included in the plugin, to clear the fields before and after the DIV field.

Q: How assign multiple class names to a field?

A: The class names are assigned to the fields through the attribute: "Add Css Layout Keywords". If you need assign multiple class names to a field, you only should enter the class names separated by space characters. For example: myclass1 myclass2

Q: What files can be uploaded through the form?

A: The File control includes an attribute for entering the file extensions that can be uploaded. But, Can be entered any file extension? The answer is NO. The last decision is taken by WordPress. WordPress for security reasons, accepts a specific list of files extensions, but with the file control it is possible restrict this list even more. Furthermore to the files extensions supported by WordPress, it is possible add new types of files. To get the complete list of files supported by default, and how to add new types of files, visit the following link:

http://wordpress.dwbooster.com/faq/calculated-fields-form#q235

Q: How can I include the link to the uploaded file into the email message?

A: The uploaded file is attached to the email and in addition to that you can include a link to it by adding a specific field tag into the email message.

In the form builder select/click the upload field for that field, there is a read-only setting named "Field tag for the message (optional):" that shows the field tag for the "uploaded file name", for example: <%fieldname7%>. If that is the tag for your file field then copy and paste that tag into the email message, adding the postfix _url, example: <%fieldname7_url%>

Q: How can be displayed texts in the calculated fields?

A: The calculated fields have been implemented to display the result of mathematical equations, but if you want display texts in the calculated fields, you only should modify a little the plugin's code.

  1. Open the "/wp-content/plugins/calculated-fields-form/js/modules/01_mathematical_logical/public/module_public.js" file, in the text editor your choice.

  2. Go to the snippet of code:

    return isFinite( v ) || /\d{2}[\/\-\.]\d{2}[\/\-\.]\d{4}/.test( v );        
    

and edit it like follow:

    return (typeof v != 'undefined');  

Q: Why the form builder is displaying the error message: "The entered data includes invalid characters..."?

A: Sometimes the users copy the text for the fields labels, and descriptions, from a different platform, for example Excel or MS Word, but the text copied can include invalid characters. The plugin validates the form's structure to avoid this type of errors.

Q: How to use conditional statements in the equations?

A: There are three ways to use conditional statements in the equations:

  • Using the IF operation (don't confuse the operation "IF" with the reserved word "if" of javascript, the code in javascript is case sensitive)

    IF( condition, value if true, value if false)       
    

For example, if the result of the equation is 100 when the value of fieldname1 is less than 100 and 1000 in another case, the equation would be:

    IF(fieldname1<100,100,1000)     
  • Using the ternary operator of javascript

    (condition) ? value if true : value if false    
    

Following the same example in the previous point:

    (fieldname1<100) ? 100 : 1000       
  • With a more powerful equation

    (function(){        
        if( fieldname1 < 100) return 100;       
        else return 1000;       
    })()        
    

Q: My company has different departments( the sales department, and the support group). Could you send a notification email to a representative of each departments when the form be submitted?

A: Yes, that is possible, you only should enter all emails addresses separated by the comma symbol, through the attribute: "Destination emails", in the form's settings.

Q: Why the users are not receiving the notification emails if was selected the option for send a copy to the user, and selected the email field, from the form's settings?

A: If the users are not receiving the notification emails with submission data, the probable reasons are:

  1. The email should be sent through SMTP. In this case you should install in your WordPress one of the available plugins for SMTP integration, in the WordPress directory.

  2. The web server allows send emails directly, but the email address entered in the "from" attribute, does not belongs to the same domain of the website. In this case, the email services classify the notification email as a possible identity fishing; and the email is deleted by security. You should enter in this attribute an email address belonging to the website's domain.

Q: How could be printed the form only and not the complete page?

A: To print only the form, but not the rest of page, you should insert a button in the form, and paste the snippet of code below, as its onlcick event. Be sure not entering any change of line:

    var w=window.open(null, 'Print_Page', 'scrollbars=yes');jQuery('#fbuilder input').each(function(){var e = jQuery(this);e.attr('value', e.val());});w.document.write(jQuery('#fbuilder').html());w.document.close();w.print();       

Q: How to disable the dynamic evaluation of the equations, when vary the fields values?

A: To disable the dynamic evaluation of the equations in the form, you only should uncheck the option: "Eval dynamically the equations associated to the calculated fields", from the "Form Settings" tab, of form builder. But, should be inserted a button with "calculate" type, to evaluate the equations with an direct action of users.

Q: I've implemented complex equations, but are not working. What can I do?

A: The plugin tries to optimize the equations to improves forms performance, and reduce the sequence of equations, but if the equations are not working, I suggest to select any of the calculated field in the form, and untick the option: "Optimize Form Equations"

Q: How to send specific fields in the notification emails, and not all form fields?

A: The notification emails can include all fields submitted by the form (<%INFO%>) or specific files (<%fieldname#%>), furthermore, some other special tags. Please, visit the following link to get the complete list of tags to include in the email:

http://wordpress.dwbooster.com/faq/calculated-fields-form#q244

Q: How to include my own javascript files to implement my own operations?

A: The "Calculated Fields Form" plugin, loads dynamically all javascript files included in the directories: "/wp-content/plugins/calculated-fields-form/js/fields-admin/", and "/wp-content/plugins/calculated-fields-form/js/fields-public/", for the form builder, and the public forms respectively, the files are loaded ordered by its names. So, if you want implement your own operations to be used from the equations, you simply should create a new javascript file in the "/wp-content/plugins/calculated-fields-form/js/fields-public/" directory, with the implementation of your own operations, and then, use the new operations from the equations associated to the calculated fields.

Q: How to calculate the number of words in a text?

A: In my explanation I'll assume that the fieldname1 field is a textarea. The equation in this case would be:

    (function(){    
        var text = 'fieldname1';    
        text = text.replace( /[^\w]/g, ' ' ).replace( /^\s+/, '' ).replace( /\s+$/, '').replace(/\s+/g, ' ');   
        return (text.length) ? text.split(' ').length : 0;  
    })()    

Q: How to calculate the number of characters in a text, excluding the blank characters?

A: In my explanation I'll assume that the fieldname1 field is a textarea. The equation in this case would be:

    (function(){    
        var text = 'fieldname1';    
        text = text.replace( /[\s\t\r\n]/g, '' );   
        return text.length; 
    })()

Q: How to assign a value to a field that is not a calculated field from an equation?

A: To enter a value programmatically to a field, that is not a calculated field, will require to assign custom class names to the fields, and edit any of the equations in your form. Please, visit the following link:

http://wordpress.dwbooster.com/faq/calculated-fields-form#q248

Q: How to insert a link in the form?

A: The form builder does not include a field to insert links explicitly in the form, but you can insert a link through an "Instruct. Text" field. Simply insert an "Instruct. Text" field in the form, and then, enter the tag of the link in any of the field's attributes: "Field Label", or "Instructions for User". For example, to insert a link to our website, you should enter the following tag:

<a href="http://wordpress.dwbooster.com">Visit the website</a>

Q: How to define dependencies between fields in the form?

A: Visit the following link with a tutorial about the use of dependencies between fields in the form,

http://blog.net-factor.com/how-to-use-dependencies-between-fields-in-the-form/

Q: How can be created dependencies with multiple fields?

A: To create dependencies that depend of values of multiple fields, will be needed validate the dependencies rules, and display or hide the fields through an equation. Please, visit the following link:

http://wordpress.dwbooster.com/faq/calculated-fields-form#q250

Q: How to populate the form fields with URL parameters?

A: I will explain the implementation through an example. I will assume that the URL parameters are 'productid' and 'productname'. So, I will insert two single text fields in the form, for the product's id, and the product's name, respectively. I will assign a class name to each field for identify the fields in the equations: productidclss, and productnameclss respectively (the class names are assigned to the fields through the attribute: "Add Css Layout Keywords")

Finally, insert a calculated field in the form with the following equation:

(function(){    
    function urlParam(name){    
        var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);  
        return decodeURI(results[1]) || 0;  
    }   
    jQuery('.productidclss input').val(urlParam('productid'));  
    jQuery('.productnameclss input').val(urlParam('productname'));  
})()    

The calculated field in this case is an auxiliary field that is not relevant in the form's interface, so I will check the option "Hide Field From Public Page" for the calculated field.

Q: How to prevent users vary the values of fields, for paying less than the calculated price?

A: The form settings include the attribute "Base amount" to define the minimum price allowed. So, if an user manipulates the calculated field for paying less, will be applied the number entered in the "Base amount" attribute.

Q: How to use the value of a field in the form, as the name of product submitted to PayPal?

A: Through the attribute: "Paypal product name" in the form's settings, is defined the name of the product to be submitted to PayPal. It is possible to use a fixed text, or the value of a field in the form (for example, suppose that you have a DropDown field, or radio buttons field, to select the product's name), each field has associated a name with the format: fieldname#. For example to use the value of the fieldname1 field, as the product's name, should be entered the text <fiedname1> in the "Paypal product name" attribute.

Q: How to allow to the users decide the frequency of payments for recurring payments?

A: Please, read the instructions in the our technical blog. http://blog.net-factor.com/published-the-calculated-fields-form-pro-v5-0-21-dev-v5-0-22/

Q: How to select a choice in a DropDown field, or Radio Button, based on calculated value?

A: Please, read the answer in the our technical blog: http://blog.net-factor.com/how-to-select-a-choice-in-a-dropdown-field-or-radio-button-based-on-calculated-value/

Q: How to use a session variable in the equations?

A: Please, read the answer in the FAQ entry: http://wordpress.dwbooster.com/faq/calculated-fields-form#q268

Q: How to use cookie variables in the equations?

A: Please, read the answer in the FAQ entry: http://wordpress.dwbooster.com/faq/calculated-fields-form#q269

Q: How to use a parameter passed by post in the equations?

A: Please, read the answer in the FAQ entry: http://wordpress.dwbooster.com/faq/calculated-fields-form#q270

Q: How to use a parameter passed by get in the equations?

A: Please, read the answer in the FAQ entry: http://wordpress.dwbooster.com/faq/calculated-fields-form#q271

Q: How to use the data submitted by a form in another one?

A: Please, read the instructions in the our technical blog.

http://blog.net-factor.com/how-to-use-the-data-submitted-by-a-form-in-another-one/

Q: How to store the data sent on a different database?

A: Please, read the instructions in the our technical blog.

http://blog.net-factor.com/how-store-data-sent-different-database/

Q: How integrate the forms with the WooCommerce products?

A: The forms should be created as usual, but if you want calculate the price of products through the form, you should select the calculated field in the "Request cost" attribute in the form settings.

Pay attention, each form has associated a number, that represent the form ID (the first column of forms list, in the settings page of the plugin).

After create the form, is time to edit the product, the addon for WooCommerce includes a new section in the product's settings (the "Calculated Fields Form" section), that allows:

  1. Associate the form with the product, entering the form ID , through the "Enter the ID of the form" attribute.
  2. If you want calculate the final price of product through the form, check the option: "Calculate the product price through the form".
  3. Define a minimum price for products, to avoid selling the products to a lower price than allowed.

The data submitted through the form are available from the Orders section of WooCommerce.

Q: Why the WooCommerce product is not displaying the "Add to Cart" button?

A: If you have created the form correctly, and associated it to the product, even if you have configured the product to calculate the price with the form, you will need to assign a price to the product, through the attribute: "Regular Price", or WooCommerce won't display the "Add to Cart" button.

Q: What is SalesForce, and how to create new leads from my forms?

A: To get a complete guide about the integration of forms created with the plugin and the SalesForce service, please visit the following link

http://blog.net-factor.com/what-is-salesforce-and-how-to-create-new-leads-from-my-forms/

Q: How to export the submitted files to DropBox?

A: Please, visits the following link to get a tutorial to integrate the form with the Dropbox service.

http://wordpress.dwbooster.com/faq/calculated-fields-form#q272

Q: How to generate a PDF file with the submitted information, and send it as attachment to the user?

A: Please, visits the following link to get a tutorial:

http://wordpress.dwbooster.com/faq/calculated-fields-form#q273

Q: How to use a file field with multiple selection from Zapier?

A: Please, visits the following link to get the answer to your question:

http://wordpress.dwbooster.com/faq/calculated-fields-form#q274

Requires: 3.0.5 or higher
Compatible up to: 4.3
Last Updated: 2015-7-31
Active Installs: 10,000+

Ratings

4.5 out of 5 stars

Support

53 of 57 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

100,1,1
100,1,1
100,3,3
100,2,2
67,3,2
100,1,1
100,1,1
100,2,2
100,3,3
100,4,4
100,1,1
100,1,1
100,1,1
100,3,3
100,4,4
100,4,4
100,1,1 100,1,1
100,1,1 100,2,2 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
0,1,0
100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,1,1