Form Button Component (v1) form-button-component-v
The Core Component Form Button component allows for the inclusion of a button field in a form to trigger an action.
Usage usage
The Core Component Form Button component allows for the creation of button field, often to trigger the submission of the form and is intended to be used along with the form container component.
The button properties can be defined by the content editor in the configure dialog.
Version and Compatibility version-and-compatibility
This document describes v1 of the Form Button Component, originally introduced with release 1.0.0 of the Core Components with AEM 6.3.
The following table lists the compatibility of v1 of the Form Button Component.
Sample Component Output sample-component-output
The following is sample taken from We.Retail.
Screenshot screenshot
HTML html
<div class="cmp cmp-button aem-GridColumn aem-GridColumn--default--12">
<div class="cmp cmp-button">
<button type="BUTTON" class="btn btn-action btn-primary" name="loveToast" value="ILoveToast">
Click here if you love toast!
</button>
</div>
</div>
JSON json
"container": {
"columnClassNames": "aem-GridColumn aem-GridColumn--default--12",
"columnCount": 12,
"gridClassNames": "aem-Grid aem-Grid--12 aem-Grid--default--12",
":items": {
"button": {
"columnClassNames": "aem-GridColumn aem-GridColumn--default--12",
":type": "weretail/components/form/button",
"name": "loveToast",
"jcr:title": "Click here if you love toast!",
"type": "submit",
"value": "ILoveToast"
}
},
":itemsOrder": [
"button"
],
":type": "weretail/components/form/container"
}
Configure Dialog configure-dialog
The configure dialog allows the content author to define the parameters of the button.
-
Type
- Button
- Submit
-
Title - The text displayed on the button
- If none provided it defaults to the button type
-
Name - The name of the button, which is submitted with the form data
-
Value - The value of the button, which is submitted with the form data
Design Dialog design-dialog
There is no design dialog for the Form Button component.
Technical Details technical-details
The latest technical documentation about the Form Button Component can be found on GitHub.
The entire core components project can be downloaded from GitHub.
Further details about developing Core Components can be found in the Core Components developer documentation.