// Enter the ID of the form at the end of the 'gform_confirmation_ID' filter // In this example, the function will only run on the form with the ID of 1 add_filter( 'gform_confirmation_1', 'fivetwelve_custom_url_confirmation', 10, 4 ); function fivetwelve_custom_url_confirmation( $confirmation, $form, $entry, $ajax ) { if ( isset( $confirmation['redirect'] ) ) { // Set the root URL for the site $url = home_url( '/' ); // Populate an array with our form entries $stats = array( 'product_category' => rgar( $entry, '5' ), 'product_name' => rgar( $entry, '6' ), ); // Create the redirect URL with the form inputs $confirmation = array( 'redirect' => $url . '/' . $stats["product_category"] . '/' . $stats["product_name"] ); } return $confirmation; }