gform_previous_button

Description

Allows the markup for the previous button to be changed.

Usage

Apply to all forms.

add_filter( 'gform_previous_button', 'my_previous_button_markup', 10, 2 );

Apply to a specific form.

add_filter( 'gform_previous_button_10', 'my_previous_button_markup', 10, 2 );

Parameters

  • $previous_button string

    The default markup for the previous button.

  • $form Form Object

    The current form.

Examples

Change input to button

SeeĀ gform_submit_button example 1.

Source Code

This filter is located in GFFormDisplay::get_field() form_display.php

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?