Calculated Fields Form is a plugin for creating forms with dynamically calculated fields and display the result.
This section contains mainly notes about the form builder features that are too long to explain in the main description page.
The form fields can be shown or hidden depending of the selection made on checkboxes, radio-buttons and select/drop-down fields.
When editing checkboxes, radio-buttons or select/drop-down fields in the form builder (click a field to select it and edit it details) you will see a link labeled "Show Dependencies". When clicked, a new option will appear below each field's option, labeled "If selected show: ...". The field selected into that settings option will be displayed only of that option is selected into the parent checkbox, radio-button or select/drop-down field.
Conditional rules are useful for showing information to the used based on the previous selection or just to make the form friendlier: easier to read and understand.
This rule can be used to make the user enter the same value in two or more fields, usually as a confirmation field.
The "Single Line Text", "Email" and "Password" fields have a validation option labeled "Equal to: ...". The field selected in "Equal to: ..." will be validated against the field that contains the rule.
This feature is frequently used to ask the user enter the email address twice to be sure that it is correct or to enter a password twice to avoid mistakes.
The fields can have "predefined" or "prefilled" values. There are two possible uses for this:1- Can be used for pre-filling the form with common values and save time to the end user. 2- Can be used for showing a sample of the data that should be entered in the field. In this case you may want to mark also the checkbox "Hide predefined value on click", this way the value will disappear once the user starts using the field without having to manually delete the placeholder value.
Each field has a settings value labeled "Instructions for User". Use that settings value to put instructions to the end user about filling that field. The instructions will appear in a smaller text immediately below the field in the public website.
This is also explained in the FAQ. The "Add Css Layout Keywords" is a way to apply CSS styles separately for each field. This settings field is available for each form builder field in the admin area. Into that field you can put the name of a CSS class that will be applied to the field.
Important: Put only the name of the CSS class into the "Add Css Layout Keywords"; don't put the css styles rules directly there.
There are some pre-defined CSS classes to use align two, three or four fields into the same line. The CSS classes are named:
column2 column3 column4
For example if you want to put two fields into the same line then specify for both fields the class name "column2". The above is valid for both the classic fields and the calculated fields.
The CSS classes/rules can be placed into the file "wp-content\plugins\calculated-fields-form\css\stylepublic.css" or into your theme CSS files.
For adding a new page to create multi-page forms just insert the field named "Page Break". Each form's page will be validated separately before going to the next form, however note that the calculations are applied to the whole form every time a field is modified, so a calculated field in other page may be modified even if that page isn't visible.
The calculated fields can be "hidden" fields. This way the calculated values of those "hidden" fields won't be displayed in the form. This is useful for using intermediate calculated values or for showing the calculated values only into the email (pro version).
Here are some sample formulas that can be used as base:
With simple mathematical operations:
fieldname1 + fieldname2
fieldname1 * fieldname2
fieldname1 / fieldname2
fieldname1 - fieldname2
With multiple fields and fields grouping included:
fieldname1 * ( fieldname2 + fieldname3 )
Rounded to two decimal digits:
prec( fieldname2 / fieldname3 , 2)
There is a huge number of equations that can't be recreated with simple mathematical operators, or the operations listed above, requiring "IF" conditions, here is a sample of the formula that can be used in that case:
if(fieldname3 > 100) return fieldname1+fieldname2;
if(fieldname3 <= 100) return fieldname1*fieldname2;
var calculatedValue = 0;
//Your code here
.... and note that the return value of that function will be the value assigned to the calculated field.
Into the plugin interface you will find additional help for these functions.
The following fields are available:
New fields may be added at any time, so check the latest version of the plugin since it may have new options.
Requires: 3.0.5 or higher
Compatible up to: 3.8
Last Updated: 2013-12-13
41 of 41 support threads in the last two months have been resolved.
Got something to say? Need help?