Using Group Input Types
The input types List box
and Radio button
combine two or more fields into a group. All fields with the same group name belong to one group and must have the same input type (list box or radio button).
On the Web form, the user can choose one option from each group (See also: Input Element.
The text node must have the text type Text element
or Text module
.
If they are not already there, add the fields that you want to use as simple input elements on a Web form to the text element or text module (see: Including Fields in the PC Editor).
Copy the fields that you want to group. Each field corresponds to one option in a list box or to one radio button.
In the form interface, create a field and assign a default value to it. This value will be the group name of your group.
Note
You can also define the field in the global definitions. However, it is better to define it in the form interface because you can pass the group name directly to the BSP application from there.
Enter the field name from step 3 into the Group Name
column for all fields of your group. The value of this field is used as the group name for the HTML element.
Note
This group name is valid not only within the text node but also in the entire form. You can therefore use several text nodes for the fields of a group.
Select the Default
checkbox for one of the grouped fields. This field will then be the default option within the group when the form is displayed.
Note
If you want to use a list box or a group of radio buttons for each line within a table, you have to change the group name dynamically. For example, you can assign the index of a table line to the group name field. You can then access this information again in the BSP application (see: Evaluating Form Input).
In a group of list box fields, the value of a field corresponds to the text of an option in the list box. Therefore, you have to assign this text to the field before you display the field.
Caution
You cannot create ABAP text elements within a Smart Form. To enable texts of list box fields to be translated, you have to create the ABAP text elements in the application program and pass the texts at the form interface.
In XSF output, Smart Forms marks the fields you selected as input fields. In HTML output, these fields become HTML input fields.