In SFRA, you use the server.getForms function to get the form data
structure from the relevant form definition and convert it into a JSON object. The object is
then added to the data passed to the template, so that it's available to the template via
the pdict variable. The getForm function automatically
clears the form and also provides a clear method.
Example: clearing the form using the server module forms.js functions
This example gets the profile form and clears it.
function (req, res, next) {
var accountModel = getModel(req);
var profileForm = server.forms.getForm('profile'); //gets the profile form object
profileForm.clear(); //clears the form using a function from the server module forms.js