Successfully!

Error!

You are viewing 10.0 help doc. More details are displayed in the latest help doc

JS Sound Alert for Data Entry

I. Overview

1.1 Problem description

When filling the form, if the content being entered does not match the actual situation, a warning can be issued through prompts. Simple prompts may be ignored, and here is a way to warn by sound.

As shown in the example below, if the quantity is more than 100, you can hear the alarm.

1.gif


1.2 Implementation ideas

Add conditional formatting to limit the value to be filled, and call the alarm sound through the Loading End event.

II. Example

2.1 Template preparation

You can create a template yourself, or download the attached template for testing.

2.2 Conditional Formatting

1) Add a New Value condition formatting in cell L3, as shown in the figure below:

1.png

The new value is a string: <embed width="0" height="0" src="/webroot/help/5196.mp3" autostart="true" loop="true" hidden="true"></embed>

The formula condition is: J3> 100

Note: where src is the storage path of the warning sound, you need to save the warning sound file in %FR_HOME%\webapps\webroot\help in advance. Currently, this method does not support referencing online addresses.


Click to download the warning sound file:

5196.mp3


2) Set cell L3 to Display by HTML.

2.png

 

2.3 Template web attributes

Choose Template> Web Attributes. In this example, a form is used for setting, so select Data Entry Settings and add a Loading End event, as shown in the following figure:

3.png

The JavaScript code is:

setInterval("self.location.reload();",36000);

 

2.4 Preview effect

Save the template and choose Data Entry Preview. You can experience the warning sound effect locally by yourself.

Note: Mobile terminal is not supported.

III. Completed Template

Attachment List


Theme: Secondary Development
Already the First
Already the Last
  • Helpful
  • Not helpful
  • Only read

Doc Feedback