How to send a different document to two different people from the same form submission

Normally when you submit a form you assemble one or more documents and then send them to one or more email accounts.

However, you may want to assemble one document and send it to one email account (e.g. a draft document to a lawyer), and then assemble another document and send it to a different email account (e.g. a summary document to a client).

You can do this using some custom script:


function BeforeAssembly(){


// Main Document

$(‘#UsersFileID’).val( $(‘#UsersFileIDGroup’).val() );

var FormURLs = “https://docName1.docx”;


$(‘#DocumentEmailSubject’).val(‘Main documents for {{Client_NameLong_txt}} to be reviewed’);


Assemble(false);  // false turns of certain assembly functions

// Summary Document

FormURLs = “https://docName2.docx”;


$(‘#DocumentEmailSubject’).val(‘Summary document for {{Client_NameLong_txt}}’);


var newid = createGuid();  // create seperate document under the infofile

$(‘#UsersFileID’).val( newid );


return false;