Skip to main content

beforeShow

fires before a control or its radio button is shown

beforeShow: (value: string, id?: string) => boolean | void;

Parameters:

  • value: string - the current value of the control
  • id?: string - optional, the ID of the radio button of the control

Returns:

Return false to prevent a control or its radio button from being shown; otherwise, true.

Example

form.getItem("radiogroup").events.on("beforeShow", function(value, id) {
console.log("beforeShow", value, id);
return true;
});

Related sample: Form. Hide/Show control

Change log:

  • The id parameter was added in v8.0
  • The event was added in v7.0