CodePeople2
Forum Replies Created
-
Forum: Plugins
In reply to: [Calculated Fields Form] Calcute weekdays and weekendsHello @imrobstephens
No, I’m sorry, actually the equation is incorrect, I understand now what you tried to explain: 10, and 15 are the price per night based on the day. So, in this case, the correct would be to walk from check-in to check-out, increasing the price in the process:
(function () {
let result = 0;
let from = DATEOBJ(MIN(fieldname2, fieldname3), 'dd/mm/yyyy');
let to = DATEOBJ(MAX(fieldname2, fieldname3), 'dd/mm/yyyy');
if (fieldname2 == fieldname3)
to = DATEOBJ(fieldname3 + 1, 'dd/mm/yyyy');
while (from < to) {
result = SUM(result, IF(OR(WEEKDAY(from) == 7, WEEKDAY(from) == 1), 15, 10));
from = DATETIMESUM(from, 'dd/mm/yyyy', 1, 'd');
}
return result;
})()Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Calcute weekdays and weekendsHello @imrobstephens
Yes, that’s definitely possible. However, your description isn’t entirely clear yet, so let me walk through a couple of scenarios.
Assuming you have two date fields —
fieldname2(check-in) andfieldname3(check-out) — and you want to calculate the number of nights between them, by using the DATEDIFF operation (https://cff.dwbooster.com/documentation#datetime-module):MAX(DATEDIFF(fieldname3, fieldname2, 'dd/mm/yyyy', 'd')['days'],1)or more simply:
MAX(ABS(fieldname3 - fieldname2), 1)In both cases,
MAX(..., 1)ensures that at least one night is charged, even if the dates are the same.What’s not entirely clear is your pricing rule:
“If it’s a weekday (Mon–Fri), the value per day is 10, and if it’s a weekend (Sat–Sun), the value per day is 15.”
Are you applying this condition based on the check-in date (
fieldname2), the check-out date (fieldname3), or each day within the range?If you mean applying a flat adjustment based on the check-in date, you could modify the formula like this:
MAX(ABS(fieldname3 - fieldname2)+IF(OR(WEEKDAY(fieldname2) == 7, WEEKDAY(fieldname2) == 1), 15, 10 ), 1)This formula:
- Calculates the number of nights between the two dates
- Checks whether
fieldname2falls on a weekend (Saturday = 7, Sunday = 1) - Adds 15 if it’s a weekend, or 10 if it’s a weekday
- Ensures a minimum charge of one night
Best regards.
Hello @matthiaspabst
I’m sorry for the inconvenience. I’ve identified the issue and released a new plugin update to fix it.
Please note that the plugin detects your website headers based on their configuration. If it does not detect the CSP policies correctly, you can work around this by adding an HTML Content field as the first field in your form. Enable the option to support scripts in its settings, and then enter the following code into its content attribute:
<script>cpcff_eval_blocked=true;</script>Please install the plugin update and let me know if the issue persists.
Best regards.
Hello @matthiaspabst
We just released a plugin update that should fix the reported issue. Could you please install it and let me know if the issue persists? Please remember to clear both website and browser caches after installing the plugin update.
Best regards.
Hello @matthiaspabst
Could you please contact us directly through the plugin website so we can review your case in detail?
https://cff.dwbooster.com/contact-us
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Modified field width in version 5.4.6.7 ?Hello @tooni
Your form looks great now—clean, well-structured, and visually appealing.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Modified field width in version 5.4.6.7 ?Hello @tooni
Thank you very much for your feedback. Your form looks great. However, if you’d like the input fields to extend all the way to the right edge of the form, you can simply remove that CSS rule.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Modified field width in version 5.4.6.7 ?Forum: Plugins
In reply to: [Calculated Fields Form] Modified field width in version 5.4.6.7 ?Hello @tooni
Thank you very much. The issue is simple and it is not related to the plugin update.
Please review the inline styles defined in the “Customize Form Design” setting. In particular:
#fbuilder .large {
width: 80% !important;
}You’re unintentionally narrowing your input fields through custom styling.
Please take a moment to watch the following video:
https://cff.dwbooster.com/resources/customer-support/2026/04/25/video.mp4
You just need to remove the CSS rule added through the “Customize Form Design” option in Form Settings → Advanced Settings.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Modified field width in version 5.4.6.7 ?Hello @tooni
Could you please share the link to the page where the form is published so we can review the reported issue?
The changes applied were limited to the default field size for number, currency, and slider controls. Previously, these fields were set to use the “small” width by default, and we have updated this to “medium.”
Please note that this change does not affect fields whose size has been explicitly configured through their individual settings.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Bug from Version 5.4.6.2 to Version 5.4.6.4.Forum: Plugins
In reply to: [Calculated Fields Form] Bug from Version 5.4.6.2 to Version 5.4.6.4.Hello @raufomat
We have released the plugin update that should solve the issue with both decimal places and symbols.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Bug from Version 5.4.6.2 to Version 5.4.6.4.Hello @raufomat
By the way, please note that you are currently using number fields to represent currency values. In this case, we recommend using the dedicated currency controls, as they are better suited for handling currency formats and related features.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Bug from Version 5.4.6.2 to Version 5.4.6.4.Hello @raufomat
I’ll try to describe why we have applied these changes.
Please go to your current production form, and enter as the default value of the field an incorrect format like: 123,123,123 QWERTY
As you can see, the field accept this default value, but it is incorrect, and your calculations might fail.Now, try the same in the last plugin version. It applies the format rules configured in the field to the default value. So, in this case, the plugin transforms the default value into a value that satisfies the field’s format.
We will check the issue with the decimal places in default values and we will include the correction in the next plugin update.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Bug from Version 5.4.6.2 to Version 5.4.6.4.Hello @raufomat,
Have you had the opportunity to test the recent changes in the plugin? We would greatly appreciate any feedback you can share.
If you notice any issue during its use, please don’t hesitate to contact us again, we’ll be more than happy to assist you and resolve it as quickly as possible.
Thank you very much for your time and support.