Skip to main content

beforeHide

fires before a Form control or its element is hidden

beforeHide: (name: string | number, value?: any, id?: string) => boolean | void;

Parameters:

  • name | id: string | number - the name (or id, if the name is not specified) of the Form control
  • value?: any - the current value of the control
  • id?: string - optional, the id of the element of the control of Form (for RadioGroup, CheckboxGroup)

Returns:

Return false to prevent a control or its element from being hidden; otherwise, true.

Example

form.events.on("beforeHide", function(name, value) {
console.log("beforeHide", name, value);
return false;
});

Change log:

  • The id parameter was added in v8.0
  • Before v7.0, the event took one parameter - the control id.
  • Starting from v7.0, the event takes two parameters: name|id and value.
  • The event was added in v6.5