Tutorials

/

Radio Button Group Element: How Do You Use It?

By following these steps, you can create a payment method screen where users can select only one of the options—Credit Card, Bank Transfer/EFT, or Cash on Delivery—using the Radio Button Group element, and where the selection is immediately saved as the user’s preferred payment method.

‍

‍

The “Radio Button Group” element is a button-based selection element that allows users to choose from a group of options. The options are presented under the same group, and when one option is selected, the selection of the other options is automatically deselected. In this video, we’ll explore an example of how to use this element.
Create the table structure on the screen from the “Tables” section in the “Data Sources” module. Then, create your actions from the “New SQL Action” section. Delete the “PaymentPreferences” part—which is the table name—rewrite it, and press “Enter” to ensure the correct schema name is prepended to the table name. Test and save.
Switch to the “UI Design” module. Bind the “PaymentPreferencesValue” action to the page as the “Initial Action.” In the field that opens, define “Default,” “User,” and “Current Userid.” Then, add the “Label” element to the page and enter your text in the “Value” field. Drag and drop the “Radio Button Group” element onto the page. In the “Value” field, define “Action Result,” “PaymentPreferencesValue,” “First,” and “PaymentMethod.” Set the spacing between the buttons to “10” in the “Space” field. Configure the color settings in the “Selected Font Color” and “Selected Background Color” fields. Click each “Radio Button” field individually and fill in the “Value” and “Label” fields with the appropriate text. Click the “Radio Button Group” element and use “Add Action” to add the “Save Record” action as the “onChange” action for the registration process following the payment method selection. Select the table, choose the columns that appear, and configure them as needed. Add the “PaymentPreferencesValue” action to the element and configure it. To display the selections on the screen, click the “Action Tree” area in the left-hand panel, hold down the icon next to the “PaymentPreferencesValue” action, and drag it onto the page. Make the “Table” and “Outputs” selections. Select the table and click the “TableDefaultColumn” field under “TableRow” in the “Properties” panel. Click the arrow icon in the added field. Click “Label” and select “Id” from the “Field to display” field. Enter your title in the “Title” field.
When you test the application, you’ll see a screen where a “Radio Button Group” element is used to allow users to select only one payment method—specifically, “Credit Card,” “Bank Transfer / EFT,” or “Cash on Delivery”—and the selected value is saved as the user’s payment preference.