bookmark_bordergform_confirmation_ui_settings

Description

Add new or modify existing confirmation settings that display on the Confirmation Edit screen.

Usage

Apply to all forms:

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

Apply to a specific form ID:

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

Parameters

  • $ui_settings array

    An array of settings for the confirmation UI. Each setting contains the HTML which will be displayed for that setting.

  • $confirmation Confirmation Object

    The current confirmation object being edited.

  • $form

    The current form object to which the confirmation being edited belongs.

Examples

This example demonstrates how you can add custom confirmation UI setting. Use with the gform_confirmation_before_save hook to save your custom settings.

add_filter( 'gform_confirmation_ui_settings', 'my_custom_confirmation_setting', 10, 3 );
function my_custom_confirmation_setting( $ui_settings, $confirmation, $form ) {

    $ui_settings['my_custom_setting'] = '
        <tr>
            <th><label for="my_custom_setting">My Custom Label</label></th>
            <td><input value="' . rgar( $confirmation, 'my_custom_setting' ) . '" name="my_custom_setting"></td>
        </tr>';

    return $ui_settings;
}

Source Code

This filter is located in GFFormSettings::get_confirmation_ui_settings() in form_settings.php