CodePeople2
Forum Replies Created
-
Forum: Plugins
In reply to: [Calculated Fields Form] replace numbers with special characterHello @benlashley80
Complex logics must be implemented via calculated fields.
You can insert a calculated field as an auxiliary (I will assume it is the fieldname123), and enter the equation:
(function(){
if (fieldname1 == 'yes') return '<br><span>' + fieldname2|r + '</span>';
return '';
})()And then, in the HTML Content field you should include:
<div data-cff-field="fieldname123"></div>Note that if you are configuring a complex summary in an “HTML Content” field with multiple conditions, you can generate all this structure with a calculated field and then use the “HTML Content” field to display the resulting summary.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Include Percentage only when the option clickHello @lala37
Thank you so much for using our plugin. I’m sorry, but I will need more details. I don’t understand the process you are describing. Could you please provide the equation you want to edit?
If you have a checkbox field, and you want to know the number of checkboxes that are ticked, you can use the |r modifier.The plugin processes the fields’ values before using them in the equations. For example, in checkbox fields, the default behavior is to sum or concatenate the values of the ticked choices. If you use the |r modifier with the field’s name in the equation, the plugin will use the field’s raw value. In the case of the checkboxes, it will be an array with the values of the ticked choices.
For example, if you have the checkbox fieldname1, with three choices whose values are 1, 2, and 3, respectively. If you include fieldname1 in the equation and the first and third choices are ticked, the plugin will manage the fieldname1 as the number 4 (1+3). However, if you use fieldname1|r the plugin will manage it as [1,3] (an array of values).
So, if you have an equation where you need to know the number of choices that are ticked in the checkbox field, you can implement it as follows:
(function(){
let n = fieldname1|r.length;
let result;
/* The rest of the equation that calculate the result variable value here */
return result;
})()Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] replace numbers with special characterHello @benlashley80
Mathematics is an excellent partner for tackling these types of tasks.
You can implement the equation as follows:
(function(){
let v = String(fieldname279|r);
let l = MAX(MIN(4, v.length-4), 0);
return IF(l,'*'.repeat(v.length-l)+v.substr(-1*l), v);
})()Best regards.
Forum: Plugins
In reply to: [Search in Place] Post thumbnail designHello @rayvis23
The issue with the thumbnail appearance is related to the styles inherited from the theme active on your website (specifically from Bootstrap). To ensure these styles do not affect the thumbnails’ appearance, please enter the style definition below through the “Appearance > Customize > Additional CSS” menu option:
.search-in-place .item .data{margin-left:70px !important;}
.search-in-place .item .thumbnail{width:60px !important;height:60px !important; position: absolute !important;}Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] replace numbers with special characterHello @benlashley80
If you use the regular expression, you don’t need the extra code in the “HTML Content” field.
You need to enter the regular expression
/^\d{5}\-?\d{4}$/through the “Validate against a regular expression” attribute in the single text line field’s settings, and the error message through the “Error message when the regular expression fails” attribute.Please watch the following video:
https://resources.developers4web.com/cff/tmp/2025/04/01/video-regular-expression_o.mp4
Best regards.
Forum: Plugins
In reply to: [Search in Place] Post thumbnail designHello @rayvis23
Thank you for using our plugin. I noticed on your website that there are two plugins handling the searches: our plugin and another AJAX search plugin, which is causing the search results popups to overlap.
Could you please deactivate the third-party plugin so I can test the results generated solely by our plugin?
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] replace numbers with special characterHello @benlashley80
In your specific case, a better alternative is to use a single line text with regular expression. You can enter both the regular expression and error message directly in the field’s settings. It is weird using number field in your case because it display the error message “Please enter a value less than or equal to 100000000000000000.”
However, if you prefer implementing your custom validation method, please use the formReady event:
<script>
fbuilderjQuery(document).on('formReady', function(){
fbuilderjQuery
.validator
.addMethod(
"zipcode",
function(v,e)
{
return this.optional(e) || /^\d{5}([\-]?\d{4})?$/.test(v);
}
);
fbuilderjQuery.validator.messages['zipcode'] = 'The zipcode is invalid';
fbuilderjQuery('[id*="fieldname255_"]').addClass('zipcode');
});
</script>Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] replace numbers with special characterHello @benlashley80
Note the plugin allows you to implement your own validation rules:
https://cff.dwbooster.com/documentation#new-validation-rules
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] replace numbers with special characterHello @benlashley80
If you are using number fields, and the SS numbers cannot store by zero, you can limit the min and max values as 100000000 and maximum 999999999.
Or you can use a single-line text field and validate it with regular expressions. You can enter the following regular expression through its settings:
/^\d{9}$/Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] replace numbers with special characterHello @benlashley80
If you are using a single line text control enter the number 9 and the min and max length attributes in its settings.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] replace numbers with special characterHello @benlashley80
You can use a calculated field as an auxiliary (hiding it by ticking a checkbox in its settings) and display it on the second page instead of the original Social Security number.
For example, if the original field is the fieldname1, the equation in the calculated field would be:
'*'.repeat(String(fieldname1|r).length-4)+String(fieldname1|r).substr(-4)Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] I want to display the value of another fieldHello @benlashley80
The value will be used as the default value only if fieldname1 has a value assigned when fieldname2 requires it, and the dynamic evaluation of the equation in fieldname2 is disabled.
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Button onclick event add to cartHello @servicets
No, the issue is not caused by the browser. You edited the onclick event and included some parser errors. Your current code is:
fbuilderjQuery.ajax({url: "https://www.veranstaltungsservice-ts.de/mietkorb/?add-to-cart=2091&quantity="+getField("fieldname13", this.form).val(false,true),type: "GET"});
fbuilderjQuery.ajax({url: "https://www.veranstaltungsservice-ts.de/mietkorb/?add-to-cart="+getField("fieldname24", this.form).val(false,true),type: "GET"&quantity="+getField("fieldname17", this.form).val(false,true),type: "GET"});
fbuilderjQuery.ajax({url: "https://www.veranstaltungsservice-ts.de/mietkorb/?add-to-cart="+getField("fieldname28", this.form).val(false,true),type: "GET"&quantity="+getField("fieldname25", this.form).val(false,true),type: "GET"});
window.location="./mietkorb";But the correct is:
fbuilderjQuery.ajax({url: "https://www.veranstaltungsservice-ts.de/mietkorb/?add-to-cart=2091&quantity="+getField("fieldname13", this.form).val(false,true),type: "GET"});
fbuilderjQuery.ajax({url: "https://www.veranstaltungsservice-ts.de/mietkorb/?add-to-cart="+getField("fieldname24", this.form).val(false,true)+"&quantity="+getField("fieldname17", this.form).val(false,true),type: "GET"});
fbuilderjQuery.ajax({url: "https://www.veranstaltungsservice-ts.de/mietkorb/?add-to-cart="+getField("fieldname28", this.form).val(false,true)+"&quantity="+getField("fieldname25", this.form).val(false,true),type: "GET"});
window.location.href="./mietkorb";Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Add form to WordPress MenuHello @nyasham60
Thank you very much! We truly appreciate your words, and a plugin review would be fantastic!!!
https://ww.wp.xz.cn/support/plugin/calculated-fields-form/reviews/
Best regards.
Forum: Plugins
In reply to: [Calculated Fields Form] Button onclick event add to cartHello @servicets
I’m sorry, I don’t know why you say it is not working. I tested your form, and it worked fine; the product was added to the cart. Please watch the video by visiting the following link:
https://resources.developers4web.com/cff/tmp/2025/03/31/video_o.mp4
Best regards.