lib/middleware/forms.js
function submissions(req, res, next) {
  var params = {
    formId: req.params.id
  };

  logger.debug("Middleware: form submissions: ", {params: params});

  forms.getSubmissions(req.connectionOptions, params, function(err, getSubmissionResponse) {
    if (err) {
      logger.error("Middleware: form submissions ", {error: err});
    }
    getSubmissionResponse = getSubmissionResponse || {};
    req.appformsResultPayload = {
      data: getSubmissionResponse.submissions,
      type: constants.resultTypes.submissions
    };

    next(err);
  });
}
function submissions(req, res, next) {
  var params = {
    formId: req.params.id
  };

  logger.debug("Middleware: form submissions: ", {params: params});

  forms.getSubmissions(req.connectionOptions, params, function(err, getSubmissionResponse) {
    if (err) {
      logger.error("Middleware: form submissions ", {error: err});
    }
    getSubmissionResponse = getSubmissionResponse || {};
    req.appformsResultPayload = {
      data: getSubmissionResponse.submissions,
      type: constants.resultTypes.submissions
    };

    next(err);
  });
}
function submissions ( req , res , next ) { var params = { formId : req . params . id } ; logger . debug ( "Middleware: form submissions: " , { params : params } ) ; forms . getSubmissions ( req . connectionOptions , params , function ( err , getSubmissionResponse ) { if ( err ) { logger . error ( "Middleware: form submissions " , { error : err } ) ; } getSubmissionResponse = getSubmissionResponse || { } ; req . appformsResultPayload = { data : getSubmissionResponse . submissions , type : constants . resultTypes . submissions } ; next ( err ) ; } ) ; }
List All Submissions Associated With A Form
@param req
@param res
@param next
List All Submissions Associated With A Form