Styling the Buttons on the Edit Entry Page
Note: For an in-depth tutorial, including CSS examples, see our blog post How to Style the Buttons on GravityView’s Edit Entry Page.
The Edit Entry page has Update, Cancel, and Delete buttons. Multi-page forms also show Previous and Next. How the buttons look depends on the View’s Theme setting, in the Styles tab of View Settings. With Vantage, GravityView styles the buttons for you. With Legacy, they may inherit styles from your site’s theme or show as plain HTML.
How you restyle them depends on that setting. On a View that uses Vantage, change the button design tokens, as shown in Styling buttons on themed Views. On a View that uses Legacy, target the button classes with your own CSS, as shown in Styling buttons on legacy Views. If you don’t know how to add custom CSS to your website, read Adding custom CSS to your website.
Identifying the button classes #
The buttons on the Edit Entry page are contained within a
<div> tag with an ID of #publishing-action. The button classes themselves are as follows:
- Update:
.gv-button-update - Cancel:
.gv-button-cancel - Delete:
.gv-button-delete - Previous and Next, on multi-page forms:
.gv-button-previousand.gv-button-next
Note: For information regarding HTML elements and CSS classes in GravityView, see our CSS Guide.
Styling buttons on themed Views #
On a View that uses the Vantage theme, GravityView styles the buttons with CSS custom properties, also called design tokens. The theme’s rules for button color, text color, border, and shadow use !important, so CSS that targets the button classes directly, like the examples in the next section, has no effect on those properties. Change the token values instead.
Set the tokens on the View container. Tokens set on :root have no effect, because the theme sets its defaults on the container itself. The easiest place is the View’s own Custom CSS box, with the VIEW_SELECTOR placeholder:
- Edit the View and scroll down to View Settings.
- Click Custom Code.
- Paste the CSS below into Custom CSS, change the values, and click Update.
/* Edit Entry buttons on a View that uses the Vantage theme */
VIEW_SELECTOR {
/* Update, Previous, and Next */
--gv-button-bg: #4caf50;
--gv-button-bg-hover: #46a04a;
--gv-button-color: #ffffff;
/* Cancel */
--gv-button-secondary-bg: #ffffff;
--gv-button-secondary-color: #000000;
--gv-button-secondary-border-color: #000000;
--gv-button-secondary-bg-hover: #f3f3f3;
--gv-button-secondary-color-hover: #000000;
--gv-button-secondary-border-color-hover: #000000;
/* Delete */
--gv-button-danger-bg: #f44336;
--gv-button-danger-color: #ffffff;
--gv-button-danger-border-color: #f44336;
--gv-button-danger-bg-hover: #f21c0d;
--gv-button-danger-color-hover: #ffffff;
--gv-button-danger-border-color-hover: #f21c0d;
}VIEW_SELECTOR is replaced with a selector for this View’s container, so these values apply only to this View. To set them in your site’s CSS instead, use the View ID directly, for example .gv-container-123 { --gv-button-bg: #4caf50; }. To change every themed View on the site, use body .gv-container.
These are the color tokens for each button and their default values:
| Button | Token | Default |
|---|---|---|
| Update, Previous, and Next | --gv-button-bg | #204ce5 |
--gv-button-color | #ffffff | |
--gv-button-border-color | Same as --gv-button-bg | |
--gv-button-bg-hover | A darker shade of #204ce5 | |
--gv-button-border-color-hover | Same as --gv-button-bg-hover | |
| Cancel | --gv-button-secondary-bg | transparent |
--gv-button-secondary-color | #112337 | |
--gv-button-secondary-border-color | #888888 | |
--gv-button-secondary-bg-hover | #f2f3f5 | |
--gv-button-secondary-color-hover | #112337 | |
--gv-button-secondary-border-color-hover | #112337 | |
| Delete | --gv-button-danger-bg | transparent |
--gv-button-danger-color | #c02b0a | |
--gv-button-danger-border-color | #c02b0a | |
--gv-button-danger-bg-hover | #fbe2dc | |
--gv-button-danger-color-hover | A darker shade of #c02b0a | |
--gv-button-danger-border-color-hover | A darker shade of #c02b0a |

Note: The size, spacing, and shape tokens, and the full list of GravityView design tokens, are in the CSS tokens reference.
Styling buttons on legacy Views #
The CSS in this section works on Views that use the Legacy theme. On a View that uses Vantage, the theme’s button colors and borders override it, so use the design tokens above instead.
You can use the ID of the containing
<div> and the button class to target a specific button with CSS. For example, this is how you would style the “Update” button.
#publishing-action .gv-button-update { // your CSS code here }
Buttons without any styles applied (Divi theme):

Buttons after applying custom styles:

You can add hover styles to your buttons by using the CSS
:hover selector. This allows you to change the look of an element when the user mouses over it. Here’s how you would add hover styles to the “Cancel” button:
#publishing-action .gv-button-cancel:hover { background-color: #f3f3f3; }
Targeting specific forms #
The above CSS examples will change the button styles for every View that you create. If you want to style the buttons differently for each View, you can do so by targeting the ID of the outer
<form> element.

For example, if the form linked to your View has an ID of “3”, your CSS would look like this:
#gform_3 #publishing-action .gv-button-cancel { background-color: #fff; border: 1px solid #000; }
Note: Targeting #gform_[ID] will change the button styles for each View linked to that form. In other words, if you have multiple Views linked to the same form, their button styles will look the same.
Example styles
#publishing-action{
width: 100%;
}
/* Update button */
#publishing-action .gv-button-update {
background-color: #4CAF50;
border: 2px solid #4CAF50;
color: #ffffff;
padding: 15px 32px;
text-align: center;
font-size: 16px;
}
#publishing-action .gv-button-update:hover {
background-color: #46a04a;
border: 2px solid #46a04a;
cursor: pointer;
}
/* Cancel button */
#publishing-action .gv-button-cancel {
background-color: #fff;
border: 1px solid #000;
color: #000000;
padding: 15px 32px;
text-align: center;
text-decoration: none;
font-size: 16px;
}
#publishing-action .gv-button-cancel:hover {
background-color: #f3f3f3;
}
/* Delete button */
#publishing-action .gv-button-delete {
background-color: #F44336;
border: 1px solid #F44336;
color: #ffffff;
padding: 15px 32px;
text-align: center;
text-decoration: none;
font-size: 16px;
}
#publishing-action .gv-button-delete:hover {
background-color: #f21c0d;
border: 1px solid #F44336;
}Read here how to add these CSS samples to your website: Adding custom CSS to your website