Save Confirmation Page Title to Entry
-
Hi there,
I have a form with multiple redirects confirmations, depending what the user selects, and I’d like to save the confirmation page title to the entry.
I’ve tried something like :
add_action( 'wpforms_process_complete', 'save_confirmation', 10, 4 ); function save_confirmation( $fields, $entry, $form_data, $entry_id ) { if ( $form_data['id'] == 4689 ) { // Get page confirmation URL $confirmation_url = isset( $_GET['wpforms_confirm'] ) ? esc_url_raw( wp_unslash( $_GET['wpforms_confirm'] ) ) : ''; if ( ! empty( $confirmation_url ) ) { // Store page confirmation to entry wpforms()->entry->update( $entry_id, array( 'fields' => array( array( 'id' => 67, // Hidden field ID 'value' => $confirmation_url, ), ), ) ); } } }
Doesn’t work, any idea ?
Thank you !
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Save Confirmation Page Title to Entry’ is closed to new replies.