gform_previous_button

gform_previous_button

DescriptionUsageParametersExamplesSource Code

Description
Allows the markup for the previous button to be changed.
Usage
Apply to all forms.
1add_filter( 'gform_previous_button', 'my_previous_button_markup', 10, 2 );
Apply to a specific form.
1add_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
This example demonstrates how to use to this hook to wrap the previous button in an extra

with a custom class. Useful when applying advanced CSS styling to the Previous (or Next) buttons.
1234567add_filter( 'gform_previous_button', 'my_previous_button_markup', 10, 2 );function my_previous_button_markup( $previous_button, $form ) {     $previous_button = '

' . $previous_button . '

';     return $previous_button;}
Source Code
This filter is located in GFFormDisplay::get_field() form_display.php

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注