<ao:form>

Renders a <form> tag.

Any attribute that has no namespace and begins with param. is added as a hidden form element. The parameter name is the part of the attribute name following param..

When a parameter value is null it is not added. When a parameter value is an Enum, the value is obtained via Enum.name(). If the value is an Iterable, Iterator, Enumeration, or array, then each non-null element is coerced to String as a separate parameter in iteration order. Otherwise, the value itself is coerced to String for the parameter value.

Nested <ao:param> or <ao:params> tags will add parameters after any provided as attributes.

Tag Information

Tag Class: com.aoapps.taglib.legacy.FormTag
TagExtraInfo Class: com.aoapps.taglib.FormTagTEI
Body Content: JSP
Display Name: None
Dynamic Attributes: true

Attributes

Name Required Evaluation Type Description
id No Runtime String

The id of the element. A nested <ao:id> tag will override this value.

class No Runtime Object

The CSS class for the element. A nested <ao:class> tag will override this value.

dir No Runtime String

The dir of the element. A nested <ao:dir> tag will override this value.

style No Runtime Object

The CSS style for the element. A nested <ao:style> tag will override this value.

action No Runtime String

The action for the form. The action is modified in several ways to make things much easier to work with.

A nested <ao:action> tag will override this value.

In order to make relative paths predictable, relative paths are interpreted from the current JSP page.

In order to keep paths app-relative, if starts with a /, the context path will be prepended to the path.

In order to simplify things behind URL mapping schemes, the action is always written starting with '/'. This avoids any need to include any <ao:base> tags.

URL rewriting is performed as needed via HttpServletResponse.encodeURL.

To support paths in different character sets, a Unicode to ASCII URI encoding is performed on every character that is not defined in RFC 3986: Reserved Characters. To avoid ambiguity, any dynamic parameters or anchors in the URL must have been correctly encoded by the caller.

Any directly nested <ao:param> or <ao:params> tag will add parameters to the action.

Any URL parameters will not be in the action attribute, but instead will be rewritten into hidden form elements. This, in conjuction with response URL rewriting, can maintain state even through posts.

enctype No Runtime String

The enctype for the form. A nested <ao:enctype> tag will override this value.

method No Runtime String

The method used, must be either post or get. Defaults to get. A nested <ao:method> tag will override this value.

target No Runtime String

The target for the form. A nested <ao:target> tag will override this value.

onsubmit No Runtime Object

A JavaScript onsubmit handler. A nested <ao:onsubmit> tag will override this value.

Variables

No Variables Defined.