I. Overview
1.1 Requirement
By clicking the Radio Button Group widget, an option will be selected. By clicking the widget again, the option will not be selected. This design is less humanized. So how to always have an option selected?
Before setting:
After setting:
1.2 Solution
Add an After Initialization event and a State Change event to the Radio Button Group widget with JavaScript.
You will learn |
---|
|
II. Sample
2.1 Attributes of the Radio Button Group widget
1)Add a Radio Button Group widget and a Query widget to the parameter pane:
2) The default value of the Radio Button Group widget is F. Set the Data Dictionary as Custom and set the Actual Value to F and M and the Display Value to Female and Male, as shown below:
2.2 Add JS events
1) Click on the button and add an After Initialization event:
2)Click on the button and add a State Change event:
2.3 Preview
Save the template and click [Pagination Preview]. The preview effect is shown as below:
III. Download the template
The radio button group always keeps an option selected.cpt
Refer to the original link: https://help.fanruan.com/finereport/doc-view-2027.html