JS Change font color when editing

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

    1.1 Problem

    Many report designs use dark colors as the background. Although the font can be set to light colors, the font is still black when in edit mode:

    1.gif


    1.2 Solution

    Add the pre-editing event of the widget , write JS to change the font color.

    Note: This function does not support mobile devices.

    2.gif

    II. Example

    2.1 Report design

    Design the table as shown below, add [Text Field Widget] to cell A2, and add [Text Area Widget] to cell B2.

    3.png


    2.2 Add JS event

    Select cell A2, click the [Event] tab, and add a [Before Editing] event to the text widget.

    Add the following JavaScript:

    $("input").css("color","white");

    4.png

    Select cell B2 , click the [Event] tab, and add a [Before Editing] event to the text field widget.

    Add the following JavaScript:

    $("textarea").css("color","white");

    5.png


    2.3 Preview effect

    Save and click [Data Entry Preview]:

    6.gif

    III. Download template

    Attachment List


    Theme: Data Entry
    • 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