Core Docs - Core Concepts - Entry Form Buttons
Rock Version: v21.0
Last Modified: 2026-09-28 2:04 PM
Buttons on entry forms have several capabilities. Learning to extend them can help you build even more power into your workflows.
Button Types
You'll notice that Rock ships with several different button types. These provide the basic styles for the buttons. You can define new types under Admin Tools > General Settings > Defined Types > Button HTML. When you define a button, you must provide mark-up for both a normal webpage and an HTML email.
Cancel Buttons
All buttons on a form will cause 'validation' to occur. This is a fancy term for checking that all the required fields are provided for. Sometimes though you want to provide a cancel button. Having to fill out all of the required fields just to cancel can be annoying. To keep the validation from occurring, use the Cancel button type or create your own button type that skips validation.
A button type's markup lives in its Button HTML field and usually includes onclick="{{ ButtonClick }}". When the form displays, Rock fills in the {{ ButtonClick }} merge field with code that tells the form to check required fields. Put return true; there instead and Rock treats the button like Cancel, so the check never runs. To build one: