MyWidget

MyWidget

An example widget.

Make sure to give the widget a unique widget class name and extend Widget.

Constructor

new MyWidget()

Source:

Members

(static) selector

Source:

The selector that determines on which form control the widget is instantiated. Make sure that any other widgets that target the same from control are not interfering with this widget by disabling the other widget or making them complementary. This function is always required.

value :*

Source:

Obtain the current value from the widget. Usually required.

Type:
  • *

value

Source:

Set a value in the widget. Usually required.

Methods

_init()

Source:

Initialize the widget that has been instantiated using the Widget (super) constructor. The _init function is called by that super constructor unless that constructor is overridden. This function is always required.

disable()

Source:

Disallow user input into widget by making it readonly.

enable()

Source:

Performs opposite action of disable() function.

update()

Source:

Update the language, list of options and value of the widget.