Description
This filter allows the form confirmation text to be programmatically changed before it is rendered to the page. It was added to accomplish a very specific internal task of enqueuing the scripts and only executes for text confirmations. When filtering confirmations, it is advised that you instead use the filter gform_confirmation
.
Usage
Applies to all forms:
add_filter( 'gform_get_form_confirmation_filter', 'your_function_name', 10, 2 );
To target a specific form append the form id to the hook name. (format: gform_get_form_confirmation_filter_FORMID)
add_filter( 'gform_get_form_confirmation_filter_10', 'your_function_name', 10, 2 );
Parameters
- $progress_confirmation string
The confirmation text. - $form Form Object
The form currently being processed.
Source Code
This filter is located in the GFFormDisplay::get_form() in form_display.php