Form Widgets

  • Last update:  2023-05-19
  • Overview

    Related Video

    Application Scenarios

    When designing a report form, if you need to modify or add data, you should add a form widget to the cell where the data is entered.

    FineReport has 16 types of widgets for different needs.

    Function Entrance

    How to add a form widget to a cell: Select the cell, choose Widget Setting in the right-hand property panel, click the drop-down list of Select Widget, and choose the desired widget. As is shown below:

     1.3.png

    Widget Types

    The table below provides a brief introduction to the usage scenarios of 16 types of widgets. Click the corresponding hyperlink to view the detailed introduction of each widget.

    Type

    Widget Name & Help Document

    Application Scenario

    Filling in

    Text Field Widget

    Fill in single-line text information, such as name, email, phone number, zip code and so on.

    Text Area Widget

    Fill in multi-line text information, such as personal introduction, product description, questionnaire survey and so on.

    Number Widget

    Fill in numbers, such as sales, profits, grades and so on.

    Password Widget

    Fill in passwords, which will be invisible as they are typed

    Clicking

    Button Widget

    After clicking, a certain effect is achieved, such as inserting a row button when filling in a form, deleting   a row button when filling in a form and so on.

    Selecting

    Checkbox Widget

    Multiple data can be selected at the same time for processing, such as batch deletion, submission, modification and so on.

    Radio Button Group Widget

    There are multiple data items to choose from, but only one can be submitted, such as single-choice questions in exams or questionnaires and so on.

    Checkbox Group Widget

    There are multiple data items to choose from, and multiple submissions can be made at the same time, such as   multiple choices on a test paper, multiple choices on a questionnaire and so on.

    Drop-down Box Widget

    Click the drop-down box to display multiple options, select one of them and fill it into the cell.

    Drop-down   Checkbox Widget

    Click the drop-down box to display multiple options, and you can select multiple options to fill in the cell at the same time.

    Date Widget

    Select a date and fill it into the cell.

    File Widget

    Save uploaded files to a database table

    List Widget

    The options are displayed in list form. You can select one and submit it.

    Iframe

    Insert other web pages or reports into cells

    Drop-down Tree Widget

    Select the option under the tree structure to fill in the cell, and then submit. Single or multiple selections are supported.

    View Tree Widget

    Select the options under the tree structure and submit directly, supporting single or multiple selection.

    Setting Default Values for Form Widgets

    If you want a widget to have a default value when filling out the form, simply fill it in the cell where the widget is located when designing the form template.

    For example, if you want to assign a default value to the date field in the template below and dynamically display today's date, you just need to write the formula =today() in the cell of the date when designing the template, as shown in the figure below:

    3的第一张.png

    3的第二张.png

    Notes

    Data Dictionary Linkage Clearing the Widget Value

    Under the current function design, when the widget triggers data dictionary linkage, it will clear the value of the linked widget.

    4.1.gif

    Parameter Panel Widgets with Values Calculating the Data Dictionary During Initialization

    For parameter panel widget with data dictionary settings, if there is no default value, the data dictionary will be calculated only when the option is triggered by clicking the widget; if there is a default value, the data dictionary will be calculated when the widget is initialized. Therefore, setting default values will have a significant impact on the overall loading speed of the template when the SQL execution speed of the data dictionary is slow.

    4.2.png

    Returning the Previous Input Value If You Enter Text or Number Widgets Not Complying with the Validation Rules

    For text or number widgets with validation rules, when the input value does not meet the rules, the corresponding prompt will be displayed, and the current input value will be cleared, returning to the previous input value.

    4.3.gif

    The Digit Loss Precision of Widget's Data Dictionary

    Note: Starting from version 11.0.6, the digital type precision of the widget's data dictionary is more accurate, and the following issues will no longer occur.

    When the field type used in the widget's data dictionary is numbers, such as bigint, there may be a problem of losing precision, as shown in the figure:

    4.4第一张.png4.4第二张.png

    The solution is to convert numbers to strings, and you can perform the conversion in SQL, as shown in the following figure:

    4.4第三张.png

    The Drop-down Widget Cell Format Not Taking Effect

    If you set the data dictionary format of drop-down widget and drop-down checkbox widget cells, and the data dictionary references a dataset that contains dataset parameters, the format will not take effect during front-end preview.

    4.5.png


    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