getWidget()
Gets the Widget JSON of the current Widget (Question or Feature) being edited in an Item.
You would want to use this method so that you can display the contents of the Question being edited, for example.
Examples
var widgetJSON = authorApp.getWidget();
console.log(widgetJSON);
Arguments
None.
Return value
- widgetJson object
Properties of the Widget JSON vary depending on the Question type or Feature type. See Question Types and Features Types in Questions API for more information.
- boolean
Returns
false
if not in the Widget editor view.
Related articles
- The
setWidget()
method, which allows you to overwrite the Widget JSON of the current Widget.