Skip to main content
Skip table of contents

Conditional Mailing List from checkboxes/radio

Create your different mailing list using a checkboxes component (you may then be able to enable/disable mail at will, remove or create new entries):

Set it “Never visible”:

Then create your radio/checkboxes condition that will select the mailing accordingly:

Create a new Business Logic to look like this:

JS
(()=>{/*debugger*/;
var final_list="";
var choixabc=<listABC>;
var choixdef=<listeDEF>;
var listeA=<liste_mail_A>;
var listeB=<liste_mail_B>;
var listeD=<liste_mail_D>;
switch(choixdef){
  case "Liste A": 
    final_list=listeA.map((x)=>{return x.value}).join(",");
    console.log("final_list:", final_list);
    break;
  case "Liste B": 
    final_list=listeB.map((x)=>{return x.value}).join(",");
    console.log("final_list:", final_list);
    break;
  case "Liste D": 
    final_list=listeD.map((x)=>{return x.value}).join(",");
    console.log("final_list:", final_list);
    break;
};})()

Here is the sample form you can import in your No Code Studio:

Invalid file id - 86105cad-30c4-4681-9b0d-923230cb6371

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.