I have a script that sends an email with the information from the spreadsheet attached to a form using the onForm submit trigger. However as I edit the form some columns get moved around.
I wanted to add a Logger.Log to try to read the proper numbers for e.values for each column and keep getting stuck.
I don't understand how to formulate it and when I try other hints form the web nothing appears in the "Execution Log" even if I have it open while I submit the form.
function myFunction(e) {
    var checkBox = e.values[6];
    if (e.values[6] == "I have completed all sections " ) {
  
        var recipientsTO = "email@email.com";
        var date = e.values[0];
        var newMemberEmail = e.values[1];
        var newMembername_old = e.values[2];
        var newMemberProcess = e.values[5];
        var newMemberAffil = e.values[8];
        var newMembername = e.values[10];
        var subject = "New Member " + newMembername + " has ... ";
        var message = "Greetings";
        MailApp.sendEmail (recipientsTO, subject, '',{htmlBody: message});}
    }
}
 
    