6 Replies Latest reply on Jun 2, 2014 8:43 AM by metroclick

    If else then statement help


      Hi, I'm trying to make a script for a email submission button to pick up from two fields for the subject line-- an id and date.  The problem is there are two date fields and I only want it to pick up only one of them.  So if the first one is blank (i.e. "home_insert_date") it will pick up the second one (i.e "apt_insert_date"), and if the first one is filled, then it'll ignore the second one.


      Here's the current code I have.


      var parts = getField("newspaper_flyerid").value + "-" + getField("home_insert_date").value + getField("apt_insert_date").value
      cTo: "email@domain.com",
      cSubject: parts,


      Many thanks!