PICKZEN
Search…
QuestionSlide
This class extends the Slide class and models a question slide.
/**
* Returns the option object from its Id.
*
* @param optionId
* @returns {*}
*/
getOptionById(optionId)
/**
* Returns the slide Id.
*
* @returns {*}
*/
getId()
/**
* Returns 'Question'
*
* @returns {string}
*/
getType()
/**
* Returns the slide layout.
*
* @returns {*}
*/
getLayout()
/**
* Returns true if the slide is multi-selection.
*
* @returns {boolean}
*/
isMultiple()
/**
* Returns the maximun number of answers that can be selected.
* @returns {*|number}
*/
getMaxAnswers()
/**
* Returns an array with the selected option objects.
*
* @returns {[]}
*/
getSelectedOptions()
/**
* Returns this slide option objects
*
* @returns {[]}
*/
getOptions()
/**
* Returns true if this slide has help.
*
* @returns {boolean}
*/
hasHelp()
/**
* Returns the defined help.
*
* @returns {*}
*/
getHelp()
/**
* Return true if we can go back to the previous slide.
* For example, we can't go back before the first slide.
*
* @returns {boolean}
*/
canBack()
/**
* Return true if we can skip the current slide.
* For example, a slide with mandatory answers can't be skipped.
*
* @returns {boolean}
*/
canSkip()
/**
* Return true if we can go to the next slide.
* For example it wil return true if the slide is optional or if it is multiple-select and has at least one option selected.
*
* @returns {boolean}
*/
canNext()
/**
* Returns true if the user has selected at least one option.
*
* @returns {boolean}
*/
isAnyOptionSelected()
/**
* Returns the back button label.
*
* @returns {string}
*/
getBackLabel()
/**
* Returns the skip button label.
*
* @returns {string}
*/
getSkipLabel()
/**
* Returns the next button label.
*
* @returns {string}
*/
getNextLabel()
/**
* Selects an option.
*
* @param option Option object.
*/
selectOption(option)
/**
* Goes back.
*/
back()
/**
* Goes next in case a multiple selection slide with at least the minimum number of options selected.
*/
next()
/**
* Skips this question if skippable (it is not mandatory).
*
*/
skip()
/**
* Returns true if the slide autoadvances when an option is selected.
*/
isAutoAdvance()
/**
* Returns an object with the slide metadata
* @returns Object
*/
getMeta()
Copy link