bookmark_bordergform_progress_bar

Description

Use this filter to modify or replace the default Gravity Forms progress bar (for multi-page forms).

Usage

Apply to all forms

add_filter( 'gform_progress_bar', 'my_custom_function', 10, 3 );

Apply to specific forms

// template
add_filter( 'gform_progress_bar_{formId}', 'my_custom_function', 10, 3 );

// target form ID 1
add_filter( 'gform_progress_bar_1', 'my_custom_function', 10, 3 );

Parameters

  • $progress_bar string

    Progress bar markup as an HTML string.

  • $form

    Current .

  • $confirmation_message string

    The confirmation message to be displayed on the confirmation page.

Examples

1. Generate custom progress bar markup

add_filter( 'gform_progress_bar', 'my_custom_function', 10, 3 );
function my_custom_function( $progress_bar, $form, $confirmation_message ) {

    $progress_bar = '<ul>
        <li>Page 1</li>
        <li>Page 2</li>
        <li>Page 3</li>
    </ul>';

    return $progress_bar;
}

Source Code

This filter is located in the GFFormDisplay class in form_display.php.

Since

This filter was added in Gravity Forms 2.0.