Skip to main content

getRadioGroupValue

getRadioGroupValue

Reads the currently selected value from a radio group.

Parameters

  • groupId (string): The identifier of the radio group

Returns: any — the currently selected value

Radio widget setup

The returned value is the value property of the currently selected Radio widget. Configure the Radio widgets placed on the Form as follows.

PropertyDescription
groupIdThe identifier of the group to read. It must match the argument passed to getRadioGroupValue.
valueThe unique identifier of each radio button. This is what gets returned for the selected radio.
note

The groupValue property is managed automatically at runtime, so you don't need to set it yourself.

Example setup

WidgetgroupId propertyvalue property
Radio 1orderTypemarket
Radio 2orderTypelimit
Radio 3orderTypestop

With Radio 2 selected, "limit" is returned.

Example

var orderType = $form.getRadioGroupValue("orderType");
$log.i("선택된 주문 유형:", orderType);

if (orderType === "limit") {
// 지정가 주문 처리
$log.i("지정가 주문");
}

Related

  • $form.setRadioGroupValue(groupId, groupValue) — sets the selected value