bookmark_bordergform_next_button

Description

Allows the markup for the next button to be changed.

Usage

Apply to all forms.

add_filter( 'gform_next_button', 'my_next_button_markup', 10, 2 );

Apply to a specific form.

add_filter( 'gform_next_button_10', 'my_next_button_markup', 10, 2 );

Parameters

  • $next_button string

    The default markup for the next button.

  • $form

    The current form.

Examples

This example demonstrates how to use to this hook to wrap the next button in an extra <div> with a custom class. Useful when applying advanced CSS styling to the Next (or Previous) buttons.

add_filter( 'gform_next_button', 'my_next_button_markup', 10, 2 );
function my_next_button_markup( $next_button, $form ) {

    $next_button = '<div class="my-custom-class">' . $next_button . '</div>';

    return $next_button;
}

Source Code

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