lib/middleware/forms.js
function get(req, res, next) {

  //Admin Fields And Data Sources Should Not Be Shown For App Requests
  var showAdminAndDataSources = !req.params.projectid;

  var getParams = {
    "_id": req.params.id,
    "showAdminFields": showAdminAndDataSources,
    includeDataSources: showAdminAndDataSources,
    //Data Source Caches are required for app requests
    expectDataSourceCache: !showAdminAndDataSources
  };

  logger.debug("Middleware: Get form: ", {getParams: getParams});

  forms.getForm(_.extend(req.connectionOptions, getParams), formsResultHandlers(constants.resultTypes.forms, req, next));
}
function get(req, res, next) {

  //Admin Fields And Data Sources Should Not Be Shown For App Requests
  var showAdminAndDataSources = !req.params.projectid;

  var getParams = {
    "_id": req.params.id,
    "showAdminFields": showAdminAndDataSources,
    includeDataSources: showAdminAndDataSources,
    //Data Source Caches are required for app requests
    expectDataSourceCache: !showAdminAndDataSources
  };

  logger.debug("Middleware: Get form: ", {getParams: getParams});

  forms.getForm(_.extend(req.connectionOptions, getParams), formsResultHandlers(constants.resultTypes.forms, req, next));
}
function get ( req , res , next ) { //Admin Fields And Data Sources Should Not Be Shown For App Requests var showAdminAndDataSources = ! req . params . projectid ; var getParams = { "_id" : req . params . id , "showAdminFields" : showAdminAndDataSources , includeDataSources : showAdminAndDataSources , //Data Source Caches are required for app requests expectDataSourceCache : ! showAdminAndDataSources } ; logger . debug ( "Middleware: Get form: " , { getParams : getParams } ) ; forms . getForm ( _ . extend ( req . connectionOptions , getParams ) , formsResultHandlers ( constants . resultTypes . forms , req , next ) ) ; }
Get A Single Form Definition
@param req
@param res
@param next
Get A Single Form Definition