# submitButton

## Purpose

Creates a submit button with the indicated value. Javascript event handlers can be added using the same parameter names as in HTML.

## Examples

    <g:submitButton name="update" value="Update" />

## Description

Attributes

- `name` (required) - The name of the button
- `value` (required) - The title of the button and name of action when not explicitly defined.

## Source

Show Source

    def submitButton = { attrs ->
            attrs.type = attrs.type ?: "submit"
            attrs.tagName = "submitButton"
            if (request.flowExecutionKey) {
                attrs.name = attrs.event ? " eventId ${attrs.event}" : " eventId ${attrs.name}"
            }
            if (attrs.name && (attrs.value == null)) {
                attrs.value = attrs.name
            }
            fieldImpl(out, attrs)
        }