new Option(_jsonOption, _question)
The Option object holds answer options. It has three fields:
- id string representing the internal id of this option
- otext string representation of the option (may include HTML)
- question the question to which this option belongs
Parameters:
| Name | Type | Description |
|---|---|---|
_jsonOption |
JSON | |
_question |
Question |
- Source:
Methods
(static) makeOptions(jsonOptions, enclosingQuestion, ordered) → {Array.<Option>}
Option.makeOptions creates option objects for the supplied question and ensures the
ordering of the options, if necessary.
Parameters:
| Name | Type | Description |
|---|---|---|
jsonOptions |
JSON | |
enclosingQuestion |
Question | |
ordered |
boolean | Array |
- Source:
Returns:
- Type
- Array.<Option>
equals(that) → {boolean}
Two options are equal if their ids and text match. Note that this is not
the same definition of equality as what is used in the final SurveyMan analysis.
Parameters:
| Name | Type | Description |
|---|---|---|
that |
* | The object we are comparing this object to. |
- Source:
Returns:
- Type
- boolean