Good morning, I’m editing Contact Form 7 in wordpress.
I need to change values of this check box [checkbox checkbox-339 use_label_element "Privato" "Azienda"] with "01" for Privati and "02" for Azienda only in automatic mail. How I can do?
Thank
I tried to insert this script in text mail, but no things change…
<span id="cambia">[checkbox-339]</span>
<script>
let text = document.getElementById("cambia").innerHTML;
curInnerHTML = curInnerHTML.replace("Azienda", "02");
curInnerHTML = curInnerHTML.replace("Privato", "01");
document.body.innerHTML = curInnerHTML;
</script>
I also tried with wpcf7_mail_tag_replaced but I don’t understand much… Where do I insert this string? How do I modify this code to get my goal?
2
Answers
Thank you so much, I resolved more easily with [checkbox* checkbox-339 use_label_element exclusive "Private|01" "Company|02"] . In this way, in front of form appear only "Private" and "Company" while in mail give me only "01" or "02". It's explained well here contactform7.com/selectable-recipient-with-pipes. Best regards