Tutorials

/

Radio Group Element: How Do You Use It?

By following these steps, you can create a payment method screen where users can select their preferred payment options—Cash on Delivery, Bank Transfer/EFT, and Credit Card—using the Radio Group element, and where their selections are instantly saved and reflected in the table.

‍

‍

The “Radio Group” element is a radio button-based input element that allows users to select from the available options. In this video, we’ll explore this element using the “Payment Method Selection” scenario.
First, create the “PaymentPreferences” and “PaymentTypes” tables on the screen from the “Data Sources” section. Create the “InsertPaymentTypes” action using the “New SQL Actions” option in the “Actions” section. Delete the table name, retype it, and press “Enter.” This will automatically add the correct schema name before the table name. Then, test and save the action. Repeat the same steps for the other actions: “PaymentTypes,” “PaymentPreferencesAllRG,” and “PaymentPreferencesValueRG.”
Switch to the “UI Design” module. To use this element, first add your “PaymentTypes,” “PaymentPreferencesAllRG,” and “PaymentPreferencesValueRG” actions to your page. Define the dropdown field within “PaymentPreferencesValueRG” as “Default,” “User,” and “Current Userid.” Add your “Label” element and enter “Select Your Preferred Payment Products” in the “Value” field. Place your “Radio Group” element below the “Label” element. Use the “Options” field to define the list of options to be displayed within the “Radio Group.” Fill in the “Actions,” “Field to display,” and “Field to Use as Key” fields. To display the selected value upon opening, define the “Value” field as “Action Result,” “PaymentPreferencesValueRG,” “First,” and “Payment Method.” Set the spacing between options to “10” in the “Space” field. Enable the “MultiSelectable” field to allow multiple selections. To save the record after the payment method selection, add the “Save Record” action and select your table within it; select the columns that appear and define the “PaymentMethod” and “Id” fields. To update the selection on the screen after the preference is set, add the created “PaymentPreferencesAllRG” action using “Add Action.” To display the selections on the screen, click the “Action Tree” area in the left sidebar, hold down the icon next to the “PaymentPreferencesAllRG” action, and drag it onto the page. Click on the table, then click “TableDefaultColumn” under “TableRow,” and use the arrow to move the added field upward. Type your title into the “Title” field. Click the “Label” field and map “Id” to the “Field to display” field.
‍When the application is tested, you’ll see that a “Radio Group” structure is used to allow users to select multiple payment preferences. The user can select one or more payment methods from the options listed on the screen—“Cash on Delivery,” “Bank Transfer/EFT,” and “Credit Card.” After making a selection, the chosen payment types are saved to the system. If there is no record for the relevant user, a new record is created; if there is an existing record, it is updated according to the selected payment types.