Click here to see your recently viewed pages and most viewed pages.
Hide
Apps Script

Class RadioButton

RadioButton

Deprecated. The UI service was deprecated on December 11, 2014. To create user interfaces, use the HTML service instead.

A mutually-exclusive selection radio button widget.

This widget fires click events when the radio button is clicked, and value change events when the button becomes checked. Note, however, that browser limitations prevent value change events from being sent when the radio button is cleared as a side effect of another in the group being clicked.

RadioButtons are grouped according to the following rules:

  • In the absence of a FormPanel, RadioButtons with the same name are part of the same group.
  • Within a FormPanel, all unnamed RadioButtons are part of the same group.
  • Within a FormPanel, all RadioButtons with the same name are part of the same group - but not part of the same group as RadioButtons with the same name outside of the FormPanel.

Note that radio button selections within a group do not propagate to server handlers created with UiInstance#createServerHandler(). Instead, to capture values on the server, use doPost() or separate handlers for each RadioButton.

Internally, UiApp widgets are built on top of the Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation directly. You can find the RadioButton documentation here.

Deprecated methods