Skip to main content
About the Resource Center

Radio button script component

Radio buttons allow the user to select one option from a set of choices.

  1. Click the Radio Button icon on the component toolbar. 

  2. Change the Text property to replace “Label” with a better description. To optionally embed the value of a variable, click the cube icon.

  3. To add more radio buttons to the page, repeat steps 1 and 2.

  4. With a radio button selected, click Advanced. Below Value, select a string variable. When the user clicks this button at run time, the variable stores a unique value. If necessary, click Create New Variable to define a new variable.

    IMPORTANT— Assign the same Value variable to all radio buttons in a set.

  5. Type a unique string in the Selected Value Text box. This text indicates the selection made by the agent. For example, MyChoice might store Younger than 30 when the Under 30 radio button is clicked. Conversely, you could set its value to Older than 30 when Over 30 is clicked.

    IMPORTANT— Assign a different Selected Value Text to each radio button in a set.

    Tip: To view selected value text, add a read-only text component to the page. Then click the cube icon and select the variable you assigned to Value.

    Click Preview. The value of the variable changes when you click each radio button.

    For more information about this technique, see Use braces to display variable values.

  6. Optionally, assign an action to run when an agent clicks the radio button. On the Advanced tab, under Change Action, click No Action Selected.

    Note: Change actions assigned to radio buttons run every time that the value of the variable assigned to the radio button changes. For example, if four radio buttons are part of a set that is associated with the same variable, then all four change actions attempt to run every time an agent selects any of the four buttons in the set. Therefore, we recommend using custom actions with radio buttons instead of assigning a different change action to each radio button.  
  7. Optionally, set other properties.

    Common

    Layout

    Advanced

    Appearance