Survey Class
Item Index
Methods
Properties
Methods
addAnsweredSectionId
(
-
Section.id
Add an answered section ID.
Parameters:
-
Section.id
String
answeredRoutes
()
Array
Returns the route keys in the sections.
Returns:
Array:
answers
()
Array
Returns all answers.
Returns:
Array:
availablePages
()
Array
Returns available page numbers.
Returns:
Array:
currentSections
()
Array
Returns an array of Section in a current page.
Returns:
Array:
initAnswers
(
-
p
-
option
Initialize all the answers and the status.
Parameters:
-
p
NumberA current page
-
option
ObjectSurvey#set option
isFirstPage
()
Boolean
Returns:
Boolean:
isLastPage
()
Boolean
Returns:
Boolean:
nextPage
()
Move to the next page.
parse
(
Object
-
resp
-
options
Parser method for using { parse: true }
option.
var survey = new BackboneSurvey.Survey({
survey: {
// Survey.attributes ....
}
, sections: [
// An array of Section.attributes ....
]
}, { parse: true });
Parameters:
-
resp
Object -
options
Object
Returns:
Object:
attributes
prevPage
()
Move to the previous page.
serializeStatus
()
String
Serialize the survey status.
Returns:
String:
startPage
()
Move to a first page, and reset all answers.
unserializeStatus
(
Boolean
-
serialized
-
option
Unserialize a survey status.
Parameters:
-
serialized
StringA serialized string Survey#serializeStatus returns
-
option
ObjectSurvey#set option
Returns:
Boolean: