PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.19
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.19
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | js/admin/settings.js +17 -0 6.46.19 View file →
@@ -8,8 +8,12 @@
8 8 function handleChangeEvent( e ) {
9 9 if ( 'INPUT' === e.target.nodeName && 'checkbox' === e.target.type && e.target.parentNode.classList.contains( 'frm_toggle_block' ) ) {
10 10 handleToggleChangeEvent( e );
11 11 }
12 +
13 + if ( 'frm_currency' === e.target.id) {
14 + syncCurrencyOptions( e.target );
15 + }
12 16 }
13 17
14 18 function handleKeyDownEvent( e ) {
15 19 switch ( e.key ) {
@@ -20,8 +24,21 @@
20 24 }
21 25
22 26 function handleToggleChangeEvent( e ) {
23 27 e.target.nextElementSibling.setAttribute( 'aria-checked', e.target.checked ? 'true' : 'false' );
28 + }
29 +
30 + /**
31 + * Updates the currency formatting options based on the selected currency.
32 + *
33 + * @param {HTMLSelectElement} currencySelect The currency select element.
34 + */
35 + function syncCurrencyOptions( currencySelect ) {
36 + const currency = frmSettings.currencies[ currencySelect.value ];
37 +
38 + document.getElementById( 'frm_thousand_separator' ).value = currency.thousand_separator;
39 + document.getElementById( 'frm_decimal_separator' ).value = currency.decimal_separator;
40 + document.getElementById( 'frm_decimals' ).value = currency.decimals;
24 41 }
25 42
26 43 function handleSpaceDownEvent( e ) {
27 44 if ( e.target.classList.contains( 'frm_toggle' ) ) {