Log In    |    Knowledge Base    |    4D Home
Tech Tip: Creating Radio Button Groups in Project Mode
Published On: June 13, 2022

Radio buttons can be configured to be grouped in a way allows only one of the radio buttons to be toggled on at a time. If a radio button is toggled, toggling on a different radio button in the group will toggle the button off.
Only one radio button can be enabled in a group:


In a Binary Mode 4D Database radio buttons were grouped using the grouping feature of the Form Editor.
The Property List the groups and objects on the form:

The two radio buttons are part of Group1:

In Project mode, this is no longer the case. Groups are for designer management. The name and the designer grouping of the radio buttons does not matter. To create a group of radio buttons, a new property is added to radio buttons labeled Radio Group. The value for the property is a text name for the group. All radio buttons with the same Radio Group name will be grouped together.

As seen below, one radio button is named "Yes" but has the Group name of "group1":

The other radio button is named "No" and is also part of "group1":

The list of groups and objects show no groups, because as explained, the Form editor grouping does not change the functionality of the radio buttons in Project Mode, only the Radio Group property matters.

The two radio buttons will only allow one the be enabled/selected at a time, just like the behavior seen in binary mode when using the Form editor grouping.

In the source files of the form.4DForm file, the property name for this is "radioGroup".