Save Answers from the Interview

The Save Answers button in the interview links to an endpoint in your host application, allowing users to save their answers without leaving the interview.

Save Answers Overview

Answers from an interview are typically saved as HotDocs Answer XML. To generate Answer XML, the Save Answers endpoint in your host application must:

  • Receive answer data posted from the interview (i.e. the endpoint must accept the POST verb).
  • Assemble a new Answers format document using Cloud Services.
  • Save the assembly result.

To save answers from the interview

1. Retrieve the answers sent from the interview

The answer data from the interview is sent to the Save Answers endpoint. The endpoint must retrieve the answers from the request form and use the answers to assemble a document. Use the following code (C#) to retrieve the answer data from the request form:

string[] hdInfoValues = Request.Form.GetValues("HDInfo");
string ansStr = "";
if (hdInfoValues != null && hdInfoValues.Length > 0)
{
     ansStr = string.Join(string.Empty, hdInfoValues);
}

2. Assemble the Document

Your endpoint generates the answer XML by making an Assemble Document request to Cloud Services, using the answers received from the interview and the Template Package used to generate the interview. The request must use the Answers Assembly Format. The Assemble Document request returns a HotDocs Answer XML (.anx) file.

3. Save the Assembly Result

Host applications typically perform one or more of the following actions to store the answer XML:

  • Save the HotDocs Answer XML file to disk
  • Save the contents of the file to a database
  • Pass the data to another process

4. Configure Get Interview to use the Save Answers Endpoint

Set the SaveAnswersPageUrl parameter for the Get Interview request to the URL for the Save Answers endpoint. Users are now able to Save Answers from the interview.