Center for Information Technology Services

Home > CITS > Systems > Content Management System Information > Custom code for Advanced Forms

Customize Advanced Forms in CMS

In order to setup your Advanced Form to send emails to multiple recipients based on multiple field entires within the form.  You will need to do something like the code below:

On the Advanced properties tab.

1. Add below named hidden fields (no value):

_seResultMail

_seNotifyMail

2. Put the following in the “include include javascript” box: 

Replace FORMNAME with the name of your adv. form.  Also replace names of field with fields within your form: 'submitteremail' 'sitementoremail'

function getInfo()

{

getCalendarDateTime();

getEmail();

return true;

}

function getCalendarDateTime ()

{

   var now = new Date();

   var monthnumber = now.getMonth() + 1;

   var monthday = now.getDate();

   var year = now.getYear();

   var hour = now.getHours();

   var minute = now.getMinutes();

   var DateTimeString = monthnumber + '/' + monthday + '/' + year + '  ' + hour + ':' + minute;

   document.FORMNAME.datetime.value = DateTimeString;

}

function getEmail()

{

    var hF=document.getElementById('FORMNAME')._seResultMail;

    hF.value = document.getElementById('submitteremail').value +","+document.getElementById('sitementoremail').value;

}