html:form

html:form — An HTML form.

Synopsis

html:form ::=

Attributes

Attributes:

  • accept
  • accept-charset
  • action (anyURI)
  • enctype
  • method (enumeration)
    • “get”
    • “post”
  • onreset
  • onsubmit

Required attributes are shown in bold.

Description

XHTML defines a html:form element that can be used to add interactivity to web pages. The HTML Forms Module for DocBook allows html:form elements to be used in DocBook documents.

A complete description of XHTML is outside the scope of this reference.

Attributes

None.

accept-charset

Specifies the list of character encodings for input data that is accepted by the server processing this form. The value is a space- and/or comma-delimited list of charset values. The client must interpret this list as an exclusive-or list, i.e., the server is able to accept any single character encoding per entity received.

accept

Specifies a comma-separated list of content types that a server processing this form will handle correctly.

action

Specifies a form processing agent. User agent behavior for a value other than an HTTP URI is undefined.

class

This attribute assigns a class name or set of class names to an element. Any number of elements may be assigned the same class name or names. Multiple class names must be separated by white space characters.

enctype

Specifies the content type used to submit the form to the server (when the value of method is post ). The default value for this attribute is application/x-www-form-urlencoded . The value multipart/form-data should be used in combination with the html:input element, type=file .

lang

This attribute specifies the base language of an element's attribute values and text content. The default value of this attribute is unknown.

method

Specifies which HTTP method will be used to submit the form data set. Possible (case-insensitive) values are get (the default) and post .

Enumerated values:
“get”

Use HTTP GET

“post”

Use HTTP POST

onclick

Occurs when the pointing device button is clicked over an element.

ondblclick

Occurs when the pointing device button is double clicked over an element.

onkeydown

Occurs when a key is pressed down over an element.

onkeypress

Occurs when a key is pressed and released over an element.

onkeyup

Occurs when a key is released over an element.

onmousedown

Occurs when the pointing device button is pressed over an element.

onmousemove

Occurs when the pointing device is moved while it is over an element.

onmouseout

Occurs when the pointing device is moved away from an element.

onmouseover

Occurs when the pointing device is moved onto an element.

onmouseup

Occurs when the pointing device button is released over an element.

onreset

Ocurs when a form is reset. It only applies to the html:form element.

onsubmit

Ocurs when a form is submitted. It only applies to the html:form element.

style

This attribute specifies style information for the current element.

title

This attribute offers advisory information about the element for which it is set.

Parents

These elements contain html:form: abstract, appendix, bibliodiv, bibliography, blockquote, caption (db.caption), entry, example, figure, footnote, html:fieldset, html:form, itemizedlist, legalnotice, listitem, note, orderedlist, revdescription, section, sidebar, td, textobject, th, variablelist, webpage.

Children

The following elements occur in html:form: blockquote, epigraph, example, figure, html:button, html:fieldset, html:form, html:input, html:label, html:select, html:textarea, informaltable (db.cals.informaltable), informaltable (db.html.informaltable), itemizedlist, literallayout, mediaobject, note, orderedlist, para, programlisting, revhistory, sidebar, table (db.cals.table), table (db.html.table), variablelist, webtoc.

Examples

 1 |<article xmlns='http://docbook.org/ns/docbook'
   |	 xmlns:html="http://www.w3.org/1999/xhtml">
   |<title>Example html:form</title>
   | 
 5 |<html:form action="http://www.example.org/cgi-bin/dosomething">
   |<!-- this is a really crude form -->
   |<para>id: <html:input name="id"/></para>
   |<para>url: <html:input name="url"/></para>
   |<para>title: <html:input name="title"/></para>
10 |<para>excerpt: <html:input name="excerpt"/></para>
   |<para>blogname: <html:input name="blog_name"/></para>
   |<html:input type="submit"/>
   |</html:form>
   | 
15 |</article>