Jotform フォームに追加されたスクリプトに問題があります。フォームとスクリプトのページはこちら: http://kucanskiposlovi.com/narucite-dolazak/
左側のラジオ ボタンがクリックされたときに、paypal チェックボックス (右側) をチェックする小さなスクリプトをソース コードに追加しました。スクリプトは動作し、ラジオボタンをクリックするとチェックボックスが埋められるのですが、なぜかペイパルの合計計算がうまくいきません。0ユーロと表示されていますが、チェックボックスをオフにして直接クリックすると、合計が機能します。
ここで Jotform コードを確認できます: https://form.jotformeu.com/61203206094343
私が追加したスクリプトは次のとおりです。
jQuery(document).ready(function() {
function subscribe() {
jQuery('input[type="radio"]').click(function() {
var trimj = document.getElementById("input_52_0");
var sestmj = document.getElementById("input_52_1");
var jednokratno = document.getElementById("input_52_2");
if (trimj.checked == true) {
//check 3 mjeseca box, uncheck all other boxes
jQuery("#input_63_1020").prop("checked", true);
jQuery("#input_63_1021").prop("checked", false);
jQuery("#input_63_1022").prop("checked", false);
jQuery("#input_63_1023").prop("checked", false);
jQuery("#input_63_1024").prop("checked", false);
jQuery("#input_63_1025").prop("checked", false);
jQuery("#input_63_1026").prop("checked", false);
jQuery("#input_63_1027").prop("checked", false);
jQuery("#input_63_1028").prop("checked", false);
jQuery("#input_63_1029").prop("checked", false);
jQuery("#input_63_1030").prop("checked", false);
} else if (sestmj.checked == true) {
//check 6 mjeseci box, uncheck all other boxes
jQuery("#input_63_1020").prop("checked", false);
jQuery("#input_63_1021").prop("checked", true);
jQuery("#input_63_1022").prop("checked", false);
jQuery("#input_63_1023").prop("checked", false);
jQuery("#input_63_1024").prop("checked", false);
jQuery("#input_63_1025").prop("checked", false);
jQuery("#input_63_1026").prop("checked", false);
jQuery("#input_63_1027").prop("checked", false);
jQuery("#input_63_1028").prop("checked", false);
jQuery("#input_63_1029").prop("checked", false);
jQuery("#input_63_1030").prop("checked", false);
}
});
}
subscribe();
});