Skip to content


Updated pdexter 2022-10-22

Opens a new document of a given template, in the current or a new window.

(client-side function)


ft3.openNewDocument( template-id, initial-values, new-window, function(err) {




Part Description
template-id id of the template to open
initial-values JSON structure of initial field values
new-window indicates whether to use a new window, or the current one
values: true for new window/tab; false for current window
callback function to call when operation has completed


       var ft3 = ntf.scope;
       var TPL_ID = 'b62410d1e601a95aacdb9c6f';
       var initialValues = {
            'genus'   : 'Cicadidae',
            'species' : 'Exuviae',
            'commonName' : 'Cicada'

       ft3.openNewDocument(TPL_ID, initialValues, 'yes', function(err){
            if (err) {
      'Error opening new document: ' + err.message);
            else {
      "New document opened.");            


For a server side version, see createDocumentFromTemplate.