JS Modify Default Text "Not Selected" of Drop-down Box

  • Last update:  2020-12-23
  • I. Overview

    1.1 Requirement

    The last option in the drop-down box defaults to “Select None”. If you pick this option, data will not be filtered in query, that is to say, all options listed in the drop-down box will be picked. So how to make the last option displayed as “Select All”?

    You will learn
    • Sample

      • Steps

      • Preview

    • Download the template

    II. Sample

    2.1 Steps

    1)Add a Drop-down Box widget to the parameter pane, customize the data dictionary, add options A, B and C, and check [Allow Null].

    The last option in the drop-down list is displayed as “Select None”.

     

    2)Add an After Initialization event to the Drop-down Box widget:

    3.png 

    Input the following JavaScript codes:

    this.options.name4Empty = "Select All";

     

    2.2 Preview

    Save the template and click [Pagination Preview]. The last option in the drop-down list is displayed as “Select All”.

    4.png 

    III. Download the template

    Attachment List


    Theme: Parameter
    • Helpful
    • Not helpful
    • Only read

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

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

    不再提示

    10s後關閉

    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