SUMMARY
Example donation form: https://secure2.convio.net/ats/site/Donation2?df_id=3360&mfc_pref=T&3360.donation=form1
PART 1
Overall, this code makese the buttons for one-time or monthly function, which is not how Luminate Online forms work out of the box.
PART 2
When someone selects the Monthly button, Javascript needs to automatically check the standard monthly check box (which should be hidden but added).
JAVASCRIPT
//Definitions
var others_input = document.getElementById('level_standardexpanded5821amount');
others_input.placeholder = '$ Other';
const freq_radio_wrapper = document.querySelector('.radio-button-container');
const freq_radio_inputs = document.querySelectorAll('.radio-button-container input[type="radio"');
freq_radio_inputs[0].checked = true;
let freq_checked = freq_radio_inputs[0];
var freq_monthly = document.getElementById("frequency_radio_Monthly");
//Conditionals
for (const freq_radio_input of freq_radio_inputs ){
freq_radio_input.onclick = function(){
if(freq_radio_input.checked){
if(freq_checked) {
freq_checked.closest(".radio-button-container").style.backgroundColor = '#d9d9d9';
freq_checked.closest(".radio-button-container").style.color = 'rgb(60,60,60)';
if(freq_monthly.checked) {
document.getElementById("level_standardauto_repeatname").checked = true;
}
else {
document.getElementById("level_standardauto_repeatname").checked = false;
}
}
freq_checked = freq_radio_input;
freq_radio_input.closest(".radio-button-container").style.backgroundColor = '#194595';
freq_radio_input.closest(".radio-button-container").style.color = 'white';
}
}
};