Search.../

value

Sets or gets a checkbox's value.

Description

The value property is not related to whether the checkbox is checked or not. To determine the checked status of a checkbox, use the checked property.

The value property is used for storing a value that is associated with the checkbox.

It is not considered when evaluating the checkbox's validity and it does not trigger an onChange event when the value is modified.

Even if a checkbox is connected to a dataset, its value property is not related to the value of the collection field it is connected to. The field's value is determined by the checkbox's checked property.

Note: Changing a checkbox's value in code does not trigger an onChange event.

Type:

stringRead & Write

Was this helpful?

Get an element's value

Code Example

Copy Code
1let myValue = $w("#myElement").value; // "42"
Set an element's value

Code Example

Copy Code
1$w("#myElement").value = "42";