Class Checkbox

Define a Checkbox block to be displayed into a JBlocks.

Class Summary
Constructor Attributes Constructor Name and Description
 

A Checkbox block displays an boolean input field.

Method Summary

Class Detail

Checkbox()

A Checkbox block displays an boolean input field.

The constructor should not be invoked directly but JBlocks#newBlock or JBlocks#addNewBlock should be used instead.

Method Detail

  • init(layout, options)
    Initializes a Checkbox block. The method is invoked by the jBlocks core and must never be called directly.
    Parameters:
    {Object} layout Optional
    see Block#init.
    {Object} options Optional
    in addition to base class options Block#init:
    {Function} options.onChange Optional
    a function to be called after the field value has changed.
    {Function} options.text Optional, Default: ""
    the label to be displayed for the input.
    {Function} options.checked Optional, Default: false
    the initial input value.