Constructor
new SettingsQuestionsForm(exportSettings)
Creates a new form to display export questions.
Parameters:
Name | Type | Description |
---|---|---|
exportSettings |
ExportSettings |
Methods
addRow()
Adds one new question to the form. The question takes up one row in the display.
getFieldsList() → {Array.<string>}
Returns a list of field names to display in the form's "field" select list.
getNamesList() → {Array.<object>}
Returns a list of names to display in the objId form field. Each option value is a UUID. The text is a name.
getQuestionFromForm() → {ExportQuestion}
Returns the user's response to quesion in the specified row. Returns an object that includes prompt, objType, objId, field.
getQuestionPrompt() → {string}
Returns the user's response to quesion.prompt in the specified row.
getQuestionsAsArray()
Returns a list of questions as an array. Each question consists of four fields (prompt, objType, objId, and field). We need this to pass questions to the HTML templates that render them.
getSelectedField() → {string}
Returns the user's response to quesion.field in the specified row.
getSelectedId() → {string}
Returns the user's response to quesion.objId in the specified row.
getSelectedType() → {string}
Returns the user's response to quesion.objType in the specified row.
parseQuestionsForExport() → {Array.<ExportQuestion>}
Returns a list of ExportQuestions parsed from the HTML form.