Radio Button Builder

 

In this topic ...

Quick Tips

Specifying Inputs

Related Topics ...

Overview: Creating Forms

HTML Guidelines

Passing Arguments to Actions

The Radio Button builder allows you to "re-use" an existing group of radio buttons on an imported page or when you want to be able to control the layout of a group of radio buttons. When the user submits the page, the value associated with the selected radio button is sent to the action that processes the form submission.

 

Quick Tips

  • Use the Radio Button builder for flexible radio button layouts -- You can tailor the display of two or more radio buttons adding <br /> tags (or any other layout tags) to achieve the layout you want.

For example, you could layout a group of four radio buttons in two rows:

Radio 1: <input name="radio1" type="radio" value="1" />

Radio 2: <input name="radio1" type="radio" value="2" /> <br />

Radio 3: <input name="radio1" type="radio" value="3" />

Radio 4: <input name="radio1" type="radio" value="4" />

This layout flexibility is not available when using the Radio Button Group builder.

  • Use indirect referencing to set the selected radio button -- We can set the selected value to be the value in a variable, the result of a method, or the output of a service call by using the Reference Chooser to select the variable, method, or service call that returns the selected value. Be sure to confirm that the referenced object returns a value that matches the "value" attribute of one of the radio buttons.

 

Specifying Inputs

The Radio Button builder takes the inputs described in the table below. For help on inputs common to many or all builders such as those in the Properties and HTML Attributes input groups, see "Using the Builder Call Editor."

Input Name Description
Name Enter a name for this builder call. The Designer displays this name in the Builder Call List.
Page Location Use the Page Location input to specify the page or pages on which this builder call will act.

See "Locating Control Builders on Pages" for detailed documentation about the Page Location input and page location syntax..

Value Use this optional input to set the return value for all  radio buttons. When any  button is selected, the value you enter here will be returned by the builder.

The builder sets the same value for all the radio buttons created in a group. So even if unique values are specified for each radio button, the builder will give one value to all the buttons. This  behavior is useful in situations where you use a loop variable or a Repeated Region Builder.

Selected Value Enter the value of the radio button to be marked as selected when the page displays. Alternatively, use the Reference Chooser to select a variable, method, or service call from which to get the selected value.