| 开发者 | pbosakov |
|---|---|
| 更新时间 | 2026年5月20日 21:18 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv3 or later |
cost_per_day * days * (1 + (tax_percentage / 100))You can use the "wpcf7calculate" jQuery event to trigger currency conversion or other post-processing operations after a calculation. You can code your own Javascript function and place it somewhere on your website to call a third-party currency conversion API. Here is an example: ```javascript jQuery(function($) { $('form').on('wpcf7calculate', function() { var dollars = jQuery('input[name=total]').val(); var euro = currencyConvert(dollars, 'USD', 'EUR'); if (euro === false) { alert('Currency conversion failed'); } else { alert(dollars + ' dollars = ' + euro.toFixed(2) + ' euro'); } return; }); }); function currencyConvert(amount, from, to) { var result = ''; var convertUrl = "https://free.currencyconverterapi.com/api/v3/convert?q=" + from + "" + to + "&compact=ultra"; var rate = false; jQuery.ajax({ url: convertUrl, async: false, type: "GET", dataType: "json", success: function (data) { rate = data[from + "" + to]; } }); return rate ? parseFloat(amount) * parseFloat(rate) : false; } ```
If more than one checkbox is selected in the same group, the values will be summed. To avoid the possibility to select more than one checkbox at the same time, use the "exclusive" modifier in the checkbox tag, or use radio buttons instead. More information and examples are available in the plugin documentation.