CodePeople2
Forum Replies Created
-
Forum: Plugins
In reply to: [Calculated Fields Form] conditionalForum: Plugins
In reply to: [Calculated Fields Form] simple math problem.Hello @dealerprincipal
Thank you so much for using our plugin.
If fieldname1 is a number, and fieldname2 is a slider field from 1 to 50 that you want to treat as a percentage, the equation in the set equation attribute of the calculated field would be:
fieldname1*fieldname2/100If you want to allow only two decimal places, you can edit the equation as follows:
PREC(fieldname1*fieldname2/100, 2, true)PREC(x, y) rounds the number x with y decimals. Passing true as the third parameter tells the plugin not to include .00 when x is an integer number.
Once the first pair is created, you can duplicate it as many times as you want. To simplify the process, include them in a DIV field and duplicate it. Please watch the following video:
https://resources.developers4web.com/cff/tmp/2025/04/20/video.mp4
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] How do I change the page break title?Hello @bandreas3
Thank you so much for using our plugin. Please scroll down in the form settings until the “texts” section, and change the value of the “Page X of Y (text)” attribute from
Page {0} of {0}toStep {0} of {0}Bets regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Unable to save data to SpreadsheetHello @miya8713
Thank you so much for using our plugin. I assume you are referring to the commercial plugin “Spreadsheet Calculated Fields Form Connector” (https://cff-bundles.dwbooster.com/product/spreadsheet). Note that it is not the calculated field, but a complementary plugin. Please contact us directly through the plugin website. Contact Us
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Center logo HeaderHello @massimo1971
Yes, of course, that’s possible. If you want to display the image centered in the form header, you need only to enter the img tag and select the option to center it. Please watch the following video:
https://resources.developers4web.com/cff/tmp/2025/04/15/video_o.mp4
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Ai assistant setupHi @massimo1971
The problem you are referring to is that OpenAI is no longer free for inferences. Previously, it allowed you to create the API Key and test it before you needed to pay for its use. Unfortunately, this is no longer the case and requires you to purchase credits for its first use. We are considering modifying the wizard to use other models that allow free inference. However, you can ask your questions directly to ChatGPT for free: https://chatgpt.com/
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Change values on results tooHello @sakis11111
I’m sorry, that depends on your project implementation, and I don’t know how you implemented the equations. If you need personalized technical support, please contact us through the plugin website, and we will check your equations. Contact Us.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Change values on results tooHello @sakis11111
The process is the same for other calculate fields.
The spinners are designed exclusively for number fields, while the equations can return text values.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Change values on results tooHello @sakis11111
Inside a function structure you must include a “return” instruction and without quotes:
(function(){
if( 'flag_b' in window ) { delete flag_b; return __ME__; }
else flag_b = true;
return 100-fieldname2;
})()Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Change values on results tooHello @sakis11111
The process is more or less complicated depending on the code of the calculated fields’ equations. The easier solution would be to untick the “Read only” checkbox in both calculated fields (depending on your project’s requirements, you should also untick the ” If value entered manually, no evaluate equation” checkbox).
Finally, use the fields as usual. However, based on your equations’ code, using the field A in the equation of field B, and field B in the equation of field A can provoke an endless loop because the result of each field will trigger the equation of the other field.
To prevent endless loops, you can use conditional statements in both equations. Assuming you have two calculated fields, the first field equation can be implemented as follows:
(function(){
if( 'flag_a' in window ) { delete flag_a; return __ME__; }
else flag_a = true;
/** The rest of the code here with the equations return **/
})()In the second calculated field:
(function(){
if( 'flag_b' in window ) { delete flag_b; return __ME__; }
else flag_b = true;
/** The rest of the code here with the equations return **/
})()Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] GDPR valueHello @ohtusabes
In this case, you must capture the content of the “HTML Content” field with a submittable control. For example, you can generate the HTML structure with another control like a calculated field, and display the result in the HTML Content field. At the end, the field’s tag you insert in the notification email is for the calculated field.
For example, you can insert a calculated field in the form (fieldname123), configured as hidden, and enter an equation similar to:
<p>Your name is ${fieldname1} and email ${fieldname2}</p>In the HTML Content field, you can insert a DIV tag with the
data-cff-fieldattribute<div data-cff-field="fieldname123"></div>Finally, in the email content, you should insert the calculated field’s tag
<%fieldname123_value%>We have responded to this question in your other support threads.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] GDPR valueHello @ohtusabes
fieldname5 in your form is not the GDPR field; it is an HTML Content control, and the HTML Content fields are not submitted to the server. In your form, the GDPR field is the fieldname4. So, you must use the
<%fieldname4_value%>tag.Best regards.
Hello @sakis11111
I’m sorry, but this request is very specific and will require custom coding services. Please contact us directly through our plugin website for further assistance.
https://cff.dwbooster.com/customization
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] fill with color the percentage in resultsHello @sakis11111
That requires a more complex CSS rule. Assuming the fields’ values go from 0 to 100, you can edit the equation as follows to apply a gradient in the field’s background:
(function () {
let fields = {
fieldname1|n: fieldname1,
fieldname2|n: fieldname2,
fieldname3|n: fieldname3
};
for (let i in fields) {
getField(i).jQueryRef().find('input').css('background', 'linear-gradient(to right, green 0%, green ' + fields[i] + '%, white ' + fields[i] + '%, white 100%)');
}
})()Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] fill with color the percentage in resultsHello @sakis11111
Thank you so much for using our plugin. Yes, that’s possible, but requires a calculated field as an auxiliary.
Assuming your fields are fieldname1, fieldname2, and fieldname3.
Insert a calculated field to use as an auxiliary. You can exclude it from the submission and hide it from the form by ticking a pair of checkboxes in its settings.
Finally, enter the following equation:
(function(){
let fields = {
fieldname1|n: fieldname1,
fieldname2|n: fieldname2,
fieldname3|n: fieldname3
},
color;
for(let i in fields) {
if(fields[i] < 50 ) color = 'green';
else if(fields[i] < 80 ) color = 'orange';
else color = 'red';
getField(i).jQueryRef().find('input').css('color', color);
}
})()Note I used hypothetical fields’ names, values, and colors. You must replace them with the preferred ones.
Also, note I included the |n modifier in the piece of code:
let fields = {
fieldname1|n: fieldname1,
fieldname2|n: fieldname2,
fieldname3|n: fieldname3
},It tells the plugin you are referring to the field’s name and not its value. The previous code creates an object with pairs, fields’ names and values.
Best regards.