1. K-State home
  2. »DCM
  3. »Web Services
  4. »CMS
  5. »Help Documentation
  6. »Assets
  7. »Advanced form options

Advanced form options

See the Advanced form example.

Each form element has an Advanced field as the last field for the element. Attributes can be included in that field to create additional form features.

Attributes are always lowercase and in certain cases, more than one attribute can be included in the field. Every declaration in the Advanced field must end with a semicolon. For example:  legend=true;

Advanced field

Using a legend

A legend can be used to display additional information or instructions for users who are completing the form. A legend is created within a Single-Line Text Field element. The Default Text is displayed and no input element is available.

legend=true;

How it appears on the page. The text underneath the Email address input field is the legend:

Legend example

How it appears when creating the form:

Legend form example

Using the fieldset

A fieldset typically includes three items that are used to group a set of form elements:

  • fieldset_start=true; — Defines the beginning of the fieldset
  • fieldset_label=Label for Fieldset; — Defines the label of the fieldset
  • fieldset_end=true; — Defines the end of the fieldset

In this example, a radio button form element is used to start a fieldset and to give it the label of Your preferences. 

In the page:

Fieldset example in a form

How it appears when creating the form:

Fieldset example in a form

Editing the submit button text

Submit is a fairly technical term used to send computer data. You may want to change the text to mirror what the user wants to do. For example, Send the request, Request the webspace, Send your comments or Send your feedback.

To change the text of the submit button, there's an input box at the bottom of the form. 

In the page:

Submit button editing

How it appears when creating the form:

Submit button creation

Horizontal display for form fields and labels

The default form display has the form label above each form field, a vertical format. See the example form.

To display the form fields next to each other, in a horizontal format, include this attribute in the Advanced field of the first element on the form. It will change the display for the entire form, but it does not make checkboxes and radio buttons inline. See the advanced form example to view a full form layout.

To change the display to horizontal, add this attribute in the Advanced field of the first element in your form:

horizontal=true;

How it appears when creating the form:

Horizontal form attribute 

Horizontal display for checkboxes and radio buttons

To display checkboxes or radio buttons horizontally, include this attribute in the Advanced field for that element:

inline=true;

In the page:

Radio button inline example

How it appears when creating the form:

Radio button inline attribute

Display size for Multi Line Fields

This attribute specifies the number of visible text lines for a multi line field or a text area. This does not determine the number of allowed input characters. To change how the field displays, add these attributes to the Advance field to specify the number of columns and/or rows to show:

cols=10;
rows=10;

In the page:

Multi line sized example

How it appears when creating the form:

multi line size example

Pre-defined dataset to a radio button, checkbox, single-select, or multi-select element

There are several datasets available to make standard field sets available without having to enter the items. For example, the "state" dataset includes all 50 United States so that they may be used in a selector element. 

Preconfigured datasets include:

  • state
  • state_ab
  • country
  • year
  • month
  • alphabet
  • numbers

To add a data set to radio button, checkbox, single-select or multi-select elements, enter the attribute in the Advanced field of the form element. Use the preconfigured dataset list above:

dataset=state;

In the page:

Data set example

 

How it appears when creating the form:

Field set form example