{/doc/acs-templating {Templating}} {Templating System Tag Reference: Formgroup} Templating System Tag Reference: Formgroup <master>

## Formgroup

Templating System : Designer Guide : Tag Reference : Formgroup

### Summary

The `formgroup` tag is used to lay out a set of check boxes or radio buttons in a dynamic form template. All the check boxes or radio buttons in a group share the same name. A button group must be created as an element in the Tcl script associated with the template.

### Usage

      <formtemplate id="choose_services">
        <table>
          <formgroup id=services>
             <tr><td>\@formgroup.widget\@</td><td>\@formgroup.label\@</td></tr>
          </formgroup>
        </table><br>
      <input type="submit" value="Submit">
      </formtemplate>

### Notes

- The `formgroup` tag contains a template for formatting each check box or radio button in the group. The tag makes a special multirow data source named `formgroup` available in the body of the tag. The `formgroup` data source includes two columns. The first is `widget`, containing an HTML `input` tag for one of the buttons in the group. The second is `label`, containing a corresponding label for the button.

- The `formgroup` tag may emulate either the `multiple` or `grid` tags in repeating the template section within the tag. By default it emulates the `multiple` tag. If the `cols` attribute is specified, the `formgroup` tag will emulate the `grid` tag.

- HTML attributes, including JavaScript event handlers, may be specified as attributes to the `formgroup` tag. The system will include all such attributes in the `input` tags of each radio button or check box in the group.

      <formgroup id="services" onChange="validate();">

- See the `formtemplate` and `formwidget` tags for more information on writing the body of a dynamic form template.

templating\@arsdigita.com