Obtaining a Widget

  • Last update:April 10, 2025
  • Version

    VersionFunctional Change
    11.0

    Difference from V10.0:

    No changes, and all the following APIs are supported in V10.0.

    iconNote:

     The following APIs can only be used on the Event panel of the widget.

    this

    API 

    this

    To obtain the current widget object, allowing you to use the APIs and attributes of the obtained widget.

      Parameter-

    -

     Returned 

        value

    objectcurrent widget object
        Example

    Example 1: You can obtain the actual value of the current widget.

    this.getValue();

    Example 2: You can set the current widget to be invisible.

    this.setVisible(false);

    Example 3: You can clear the value of the current widget.

    this.reset();


    Application

    Example

    You can set the widget to become unavailable after editing, ensuring that the widget can only be filled in once.

    3.gif

    Mobile Terminal 

    This API is supported on mobile terminals.

     this.options.form

    API 

    this.options.form

    To allow you to use the getWidgetByName(name) API.

      Parameter-

    -

     Return value-
        Example

    Example 1: You can obtain the actual value of the drop-down box widget comboBox0.

    this.options.form.getWidgetByName("comboBox0").getValue();

    Example 2: You can obatin the drop-down box widget comboBox0 and set it to be invisible.

    this.options.form.getWidgetByName("comboBox0").setVisible(false);

    Application

    Example

    You can assign a value to the obtained widget to achieve widget value linkage.

    For details, see Value Assignment to Parameter Widget by JS.

     

    4.gif

    Mobile Terminal 

    This API is supported on mobile terminals.


    Attachment List


    Theme: Secondary Development
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    8s后關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy