scale.callback

description

Executes a sequence of commands whenever a choice is made on the scale. This is particularly useful if, for example, you want to reveal a TextInput element only when a certain option is chosen.

syntax

getScale(ELEMENT_NAME).callback(sequenceOfCommands)
  • sequenceOfCommands :

since

beta 0.4

example(s)


@
@newTextInput( "other" , "" )
@    .hidden()
@,
@newScale("yarrel",  "Yanny", "Laurel", "other")
@    .labelsPosition( "right" )
@    .after( getTextInput("other") )
$    .callback(
$        getScale("yarrel")
$            .test.selected( "other" )
$            .success( getTextInput("other").visible() )
$            .failure( getTextInput("other").hidden()  )
$    )
@    .print()