/*
Theme Name: Startupzy Child
Theme URI: 
Author: 
Author URI: 
Description: 
Requires at least: 6.0
Tested up to: 6.4.3
Requires PHP: 5.7
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: startupzy
Text Domain: startupzychild
Tags: one-column, block-patterns, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, translation-ready, 
*/
// Replace space with '%20' in merge tag values
add_filter( 'gform_replace_merge_tags', 'custom_replace_merge_tags', 10, 7 );

function custom_replace_merge_tags( $text, $form, $entry, $url_encode, $esc_html, $nl2br, $format ) {
    // Check if the URL encode parameter is true
    if ( $url_encode ) {
        // Replace spaces with '%20' in the merge tag values
        $text = str_replace( ' ', '%20', $text );
    }

    return $text;
}

