ludo.form.Checkbox

ludo.form.


new ludo.form.Checkbox(config)

Class for checkbox form elements

Parameters:
Name Type Description
config Object
Properties
Name Type Description
checked booelan

Initial checked

Source:

Extends

Methods


check()

Set checkbox to checked

Source:
Returns:

void


clear()

Reset value back to the original value sent(constructor value)

Inherited From:
Source:

commit()

Update initial value to current value. These actions will always trigger a commit

  • Form or Model submission
  • Fetching new record for a ludo.model.Model
Inherited From:
Source:

disable()

Disable form element

Inherited From:
Source:
Returns:

void


enable()

Enable form element

Inherited From:
Source:
Returns:

void


getFormEl()

Get reference to input element

Inherited From:
Source:
Returns:

DOMElement


isChecked() → {Boolean}

Return true if checkbox is checked, false otherwise

Source:
Returns:

checked

Type
Boolean

isDirty() → {Boolean}

Returns true if current value is different from original value

Inherited From:
Source:
Returns:

isDirty

Type
Boolean

isValid() → {Boolean}

Returns true when value of form element is valid, i.e. larger than minValue, matching regex etc.

Inherited From:
Source:
Returns:

valid

Type
Boolean

reset()

Reset back to original value(checked or unchecked)

Overrides:
Source:

rollback()

Alias to reset

Inherited From:
Source:

setChecked(checked)

Set checkbox to checked or unchecked

Parameters:
Name Type Description
checked Boolean
Source:

setEnabled(enabled)

Enable or disable form element

Parameters:
Name Type Description
enabled Boolean
Inherited From:
Source:

uncheck()

Uncheck checkbox

Source:
Returns:

void


val(val) → {*}

Set or get value. If val argument is set, you will set a value, if not current value
will be returned.

Parameters:
Name Type Description
val String | Number | Array | Object | Boolean
Inherited From:
Source:
Returns:
Type
*