Thank you for your support, I did exactly what you had displayed in your screenshots and just didn’t get it to display only one pricing on pageload. I ended up adding a script:
That works now, you can close the ticket.
document.addEventListener("DOMContentLoaded", function() {
? ? // Function to check the selected radio button and show/hide the related HTML field
? ? function applyConditionalLogic() {
? ? ? ? // First membership logic
? ? ? ? var selectedOption1 = document.querySelector('input[name="form_fields[payment_plan]"]:checked');
? ? ? ? if (selectedOption1) {
? ? ? ? ? ? if (selectedOption1.value === 'yearly') {
? ? ? ? ? ? ? ? // Show yearly pricing for first membership, hide monthly pricing
? ? ? ? ? ? ? ? document.querySelector('.elementor-field-group-field_72648a6').classList.remove('cfef-hidden');
? ? ? ? ? ? ? ? document.querySelector('.elementor-field-group-field_9f9887f').classList.add('cfef-hidden');
? ? ? ? ? ? ? ? document.querySelector('.elementor-field-group-field_b8b4395').classList.remove('cfef-hidden');
? ? ? ? ? ? } else {
? ? ? ? ? ? ? ? // Show monthly pricing for first membership, hide yearly pricing
? ? ? ? ? ? ? ? document.querySelector('.elementor-field-group-field_72648a6').classList.add('cfef-hidden');
? ? ? ? ? ? ? ? document.querySelector('.elementor-field-group-field_9f9887f').classList.remove('cfef-hidden');
? ? ? ? ? ? ? ? document.querySelector('.elementor-field-group-field_b8b4395').classList.add('cfef-hidden');
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? // Second membership logic
? ? ? ? var selectedOption2 = document.querySelector('input[name="form_fields[second_payment_plan]"]:checked');
? ? ? ? if (selectedOption2) {
? ? ? ? ? ? if (selectedOption2.value === 'yearly') {
? ? ? ? ? ? ? ? // Show yearly pricing for second membership, hide monthly pricing
? ? ? ? ? ? ? ? document.querySelector('.elementor-field-group-field_2b0c9f0').classList.remove('cfef-hidden');
? ? ? ? ? ? ? ? document.querySelector('.elementor-field-group-field_5abe888').classList.add('cfef-hidden');
? ? ? ? ? ? ? ? document.querySelector('.elementor-field-group-field_2987ade').classList.remove('cfef-hidden');
? ? ? ? ? ? } else {
? ? ? ? ? ? ? ? // Show monthly pricing for first membership, hide yearly pricing
? ? ? ? ? ? ? ? document.querySelector('.elementor-field-group-field_2b0c9f0').classList.add('cfef-hidden');
? ? ? ? ? ? ? ? document.querySelector('.elementor-field-group-field_5abe888').classList.remove('cfef-hidden');
? ? ? ? ? ? ? ? document.querySelector('.elementor-field-group-field_2987ade').classList.add('cfef-hidden');
? ? ? ? ? ? }
? ? ? ? }
? ? }
? ? // Run the function on page load
? ? applyConditionalLogic();
? ? // Add event listeners to re-apply the logic when radio buttons are changed
? ? var radioButtons1 = document.querySelectorAll('input[name="form_fields[payment_plan]"]');
? ? radioButtons1.forEach(function(radio) {
? ? ? ? radio.addEventListener('change', applyConditionalLogic);
? ? });
? ? var radioButtons2 = document.querySelectorAll('input[name="form_fields[second_payment_plan]"]');
? ? radioButtons2.forEach(function(radio) {
? ? ? ? radio.addEventListener('change', applyConditionalLogic);
? ? });
});