Hello Yoann. It would require a bit of code but it should be possible. You would need to run some code when a specific confirmation is processed, and then you could add a note to the entry using the GFAPI that adds the confirmation name there.
Here is the GFAPI documentation for adding a note:
Do you know what type of confirmations these will be? Are they always text or redirect confirmations, or might they vary? I’m trying to find a filter you can use to get the information you need, and the type of confirmation matters. If you can provide that, I will keep looking. Thank you.
The confirmations are always “type”:“page”.
Having the page label for the entry would be perfect.
Can the page label be stored in the entry in a field “confirmation” ?
Hi Yoann. You can store the URL that was used for the confirmation redirect in a field in the entry using this code:
// apply to form 63 only
add_filter( 'gform_confirmation_63', function ( $confirmation, $form, $entry ) {
GFCommon::log_debug( __METHOD__ . '(): My Confirmation => ' . print_r( $confirmation, true ) );
// ID of the field where you want to store the confirmation that was used
$field_id = 6;
$result = GFAPI::update_entry_field( rgar( $entry, 'id' ), $field_id, $confirmation['redirect'] );
GFCommon::log_debug( __METHOD__ . '(): Result of updating entry with confirmation => ' . print_r( $result, true ) );
return $confirmation;
}, 11, 3 );
The form ID will need to be updated from 63 to whatever the form ID is on your site. And then $field_id will need to be changed from 6 to whatever the ID of the field where you want to store the confirmation URL in your entry is.
If you have any other questions, please let us know.