form.button ViewHelper <f:form.button>

Creates a button.

Examples

Defaults:

<f:form.button>Send Mail</f:form.button>
Copied!

Output:

<button type="submit" name="" value="">Send Mail</button>
Copied!

Disabled cancel button with some HTML5 attributes:

<f:form.button type="reset" disabled="disabled"
    name="buttonName" value="buttonValue"
    formmethod="post" formnovalidate="formnovalidate"
>
    Cancel
</f:form.button>
Copied!

Output:

<button disabled="disabled" formmethod="post" formnovalidate="formnovalidate" type="reset" name="myForm[buttonName]" value="buttonValue">Cancel</button>

Copied!

Arguments

additionalAttributes

DataType
mixed
Required
false
Description
Additional tag attributes. They will be added directly to the resulting HTML tag.

data

DataType
mixed
Required
false
Description
Additional data-* attributes. They will each be added with a "data-" prefix.

aria

DataType
mixed
Required
false
Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.

name

DataType
string
Required
false
Description
Name of input tag

value

DataType
mixed
Required
false
Description
Value of input tag

property

DataType
string
Required
false
Description
Name of Object Property. If used in conjunction with <f:form object="...">, the "name" property will be ignored, while "value" can be used to specify a default field value instead of the object property value.

autofocus

DataType
string
Required
false
Description
Specifies that a button should automatically get focus when the page loads

disabled

DataType
string
Required
false
Description
Specifies that the input element should be disabled when the page loads

form

DataType
string
Required
false
Description
Specifies one or more forms the button belongs to

formaction

DataType
string
Required
false
Description
Specifies where to send the form-data when a form is submitted. Only for type="submit"

formenctype

DataType
string
Required
false
Description
Specifies how form-data should be encoded before sending it to a server. Only for type="submit" (e.g. "application/x-www-form-urlencoded", "multipart/form-data" or "text/plain")

formmethod

DataType
string
Required
false
Description
Specifies how to send the form-data (which HTTP method to use). Only for type="submit" (e.g. "get" or "post")

formnovalidate

DataType
string
Required
false
Description
Specifies that the form-data should not be validated on submission. Only for type="submit"

formtarget

DataType
string
Required
false
Description
Specifies where to display the response after submitting the form. Only for type="submit" (e.g. "_blank", "_self", "_parent", "_top", "framename")

class

DataType
string
Required
false
Description
CSS class(es) for this element

dir

DataType
string
Required
false
Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)

id

DataType
string
Required
false
Description
Unique (in this file) identifier for this HTML element.

lang

DataType
string
Required
false
Description
Language for this element. Use short names specified in RFC 1766

style

DataType
string
Required
false
Description
Individual CSS styles for this element

title

DataType
string
Required
false
Description
Tooltip text of element

accesskey

DataType
string
Required
false
Description
Keyboard shortcut to access this element

tabindex

DataType
integer
Required
false
Description
Specifies the tab order of this element

onclick

DataType
string
Required
false
Description
JavaScript evaluated for the onclick event

type

DataType
string
Default
'submit'
Required
false
Description
Specifies the type of button (e.g. "button", "reset" or "submit")