Note: The following is the document reference for version 10.0
this
I. Description
In the widget event, the current widget object can be directly obtained through this
Widget refers to the widget in the cell, the widget in the parameter pane, and the widget in the body of the dashboard.
After obtaining the widget, you can call the operation method of the widget, etc.
II. Example
Get the value of the widget in the After Editing event of the Text Field widget on parameter pane.
1. Add After Editing event

The JavaScript code is as follows:
var a = this.getValue(); FR.Msg.alert("Tip",a);2. Preview effect
Enter the value of the Text Field widget into 'hello', and when you click other places , the message "hello" will be prompted.

Note: The following is the document reference for version 11.0
I. this
| Method | this | It is used in the event of the widget to get the current widget object, after which the methods and attributes of the widget can be used. |
|---|---|---|
| Parameter | - | - |
| Return value | object | current widget object |
| Example | Example 1: Obtain the actual value of the current widget Example 2: Set the current widget to be invisible Example 3: Clear the value of the current widget this.reset(); | |
Application example | After the widget is edited, it is set to be unavailable, and the implementation can only be filled once: For the detailed implementation method, please refer to: JS implements the data entry widget can only fill in once
| |
| Mobile | Support mobile terminal | |
II. this.options.form
| Method | this.options.form | Used in the event of the widget, you can call the parameter pane interface getWidgetByName(name) interface |
|---|---|---|
| Parameter | - | - |
| Return value | - | |
| Example | Example 1: Obtain the actual value of the drop-down box widget comboBox0 Example 2: Obtain the drop-down box widget comboBox0 and set it to be invisible this.options.form.getWidgetByName("comboBox0").setVisible(false); | |
Application example | After obtaining the widget, assign a value to it to realize the linkage of the widget value: For detailed implementation methods, please refer to: JS implements parameter widget assignment
| |
| Mobile | Support mobile terminal | |