CodePeople2
Forum Replies Created
-
Forum: Plugins
In reply to: [Calculated Fields Form] how can I “lock” a field?Hello @massimo1971
Thank you so much for using our plugin. You can do a simple modification; instead of using dependencies, you can check the fieldname9 value and modify the behavior of the number fields via code from an equation associated with a calculated field.
Assuming the choice value in the fieldname9 to check is 12345, the number fields are fieldname1 and fieldname2.
Insert a calculated field in the form that you can configure as hidden and exclude from submissions by ticking two checkboxes in its settings. Finally, enter the equation:
(function(){
let f1 = getField(fieldname1|n).jQueryRef();
le f2 = getField(fieldname2|n).jQueryRef();
if(fieldname9 == 12345){
f1.css('pointer-events', 'none');
f2.css('pointer-events', 'none');
} else {
f1.css('pointer-events', 'auto');
f2.css('pointer-events', 'auto');
}
})()And that’s all.
Best regards.
Forum: Plugins
In reply to: [Search in Place] Random Search ResultsHello @blackspear
Thank you very much for the feedback. Please note that the Professional plugin distribution enables you to search not only through your properties’ metadata but also across associated taxonomies.
Best regards.
Forum: Plugins
In reply to: [Search in Place] Random Search ResultsHello @blackspear
Thank you so much for using our plugin, and I apologize for the delay in responding to your query. I’ve identified an issue with the search operator. Please install the latest plugin update (released just now) and clear both your WordPress and browser caches.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Font awesome in formsHello @ohtusabes
Please insert an “HTML Content” field in the form, tick the checkbox in its settings to support advanced tags, and enter the following code in its content:
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
<style>[class*="fa"]{font-family: "Font Awesome 6 Free" !important; font-weight: 900 !important;}</style>Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Font awesome in formsHello @ohtusabes
The page you sent me as a reference does not include a form, and the links are not working for anonymous users. Please watch the following video:
https://resources.developers4web.com/cff/tmp/2025/05/12/video_o.mp4Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Ability to stop calculator when requirements not metHello @ycsuk
You can edit the equation as follows:
IF(AND(VALIDFIELD(fieldname19|n),VALIDFIELD(fieldname11|n),VALIDFIELD(fieldname12|n)), ROUND(fieldname19*3*fieldname11/fieldname12), "")If the fieldname19, fieldname11, and fieldname12 fields’ values are valid, the previous equation will evaluate the mathematical operation
ROUND(fieldname19*3*fieldname11/fieldname12)and return the empty text""otherwise.Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Ability to stop calculator when requirements not metHello @ycsuk
Thank you so much for using our plugin. Please note that the “Managing Fields” operations module includes two operations: VALIDFORM and VALIDFIELD, which help you to identify if the fields or forms are valid and operate in consequence:
https://cff.dwbooster.com/documentation#managing-fields-moduleFor example, assume you have two fields, fieldname1 and fieldname2, and you want to sum them if their values are valid, or display the message “the entry fields are invalid” otherwise.
In this hypothetical case, you can create the equation as follows:
IF(AND(VALIDFIELD(fieldname1|n), VALIDFIELD(fieldname2|n)), SUM(fieldname1,fieldname2), 'The entry fields are invalid')Or, if you have a more complex equation, and prefer to use “if” conditional statements and function structure:
(function(){
if(AND(VALIDFIELD(fieldname1|n), VALIDFIELD(fieldname2|n))) {
return SUM(fieldname1,fieldname2);
} else {
return 'The entry fields are invalid');
}
})()Note that in the VALIDFIELD operation, I use the fields’ names with the |n modifier to tell the plugin I’m referring to the fields’ names directly instead of their values. However, in the SUM operation, I use the fields’ names directly without the modifier because I’m summing their values.
Best regards.Forum: Plugins
In reply to: [Calculated Fields Form] Time Difference calculatorHello @fibbu
In your case, where the user cannot access the date component, and the fields order is important, you must compare both values, and if the second field’s value is lower than the first one, you must increase the second value by one day before calculating the difference:
let d1 = fieldname1, d2 = fieldname2;
if(d2<d1){d2 = DATETIMESUM(d2, 'mm/dd/yyyy hh:ii', 1, 'd');}
let diff = DATEDIFF(d1, d2, 'mm/dd/yyyy hh:ii', 'h');
return diff['hours']+' hours and '+diff['minutes']+' minutes';Please note that the support does not cover implementing the users’ projects. If you need personalized technical support, please contact us directly through the plugin website. Contact Us.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Time Difference calculatorHello @fibbu
If you have date/time components, that’s not possible. Please provide the link to the page containing the form.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Time Difference calculatorHello @fibbu
In that case you are not ignoring the date component as you describe initially, and the diff variable must be calculated into the “if” conditional blocks based on the new requirements. Note the last parameter changes:
(function(){
if(fieldname3 == 'Criterion 1') {
let diff = DATEDIFF(fieldname1, fieldname2, 'mm/dd/yyyy hh:ii', 'h');
return diff['hours']+' hours and '+diff['minutes']+' minutes';
}
if(fieldname3 == 'Criterion 2') {
let diff = DATEDIFF(fieldname1, fieldname2, 'mm/dd/yyyy hh:ii', 'y');
return diff['years']+' years, '+diff['months']+' months, '+diff['days']+' days, '+diff['hours']+' hours and '+diff['minutes']+' minutes';
}
})()Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Time Difference calculatorHello @fibbu
You should use conditional statements in the equation to determine the choice selected to return the corresponding result.
For example, if the date/time fields are fieldname1 and fieldname2, and there is a radio button with choices “Criterion 1” and “Criterion 2”. The equation would be simply:
(function(){
let diff = DATEDIFF(fieldname1, fieldname2, 'mm/dd/yyyy hh:ii', 'y');
if(fieldname3 == 'Criterion 1') {
return diff['hours']+' hours and '+diff['minutes']+' minutes';
}
if(fieldname3 == 'Criterion 2') {
return diff['years']+' years, '+diff['months']+' months, '+diff['days']+' days, '+diff['hours']+' hours and '+diff['minutes']+' minutes';
}
})()And that’s all.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Calculated field with radio buttonsHello @ohtusabes
Please click on the link to enter the validation rule manually, and enter a validation rule that do not allow ambiguity:
value|r===0Please look at the screenshot image:

Best regards.
Hi! We’d like to help but we can’t reply about that in this forum. We are not allowed to support any customers in these forums.
For pro or commercial product support please contact us directly on our site. This includes any pre-sales topics as well.
Commercial products are not supported in these forums. We will happily answer this and any other questions you can have on our own site.
Thank you.
Forum: Plugins
In reply to: [Calculated Fields Form] Calculated field with radio buttonsHello @ohtusabes
In your specific case, a better alternative is to compare with the |v modifier, to use exactly the field’s value that would be submitted, and the !== used in JavaScript to compare the exact value.
IF(
AND(
fieldname3|v !== "",
fieldname6|v !== "",
fieldname14|v !== "",
OR(fieldname12|v !== "", fieldname15|v !== "")
),
fieldname3 + fieldname6 + fieldname14 +
IF(fieldname12|v !== "", fieldname12, fieldname15),
""
)Best regards.
Hello @massimo1971
Thank you so much for using our plugin.
Yes, that’s possible. Please enter the style definition below through the “Customize Form Design” attribute in the “Form Settings > Advanced Settings” tab:
@media print{
#fbuilder .cff-collapsible.cff-collapsed{display:none !important;}
}Best regards.