Field in redirect and email print variable instead of field content
-
Hello,
I use Forminator to display a form to download a file after submit and all was work good but since a few days or more, the redirect and the mail print the variable instead the url I want.
In my field “file” I have a variable “%file_url%”
In my functions.php I have this code :
/* Replace variable with data in forminator */ add_filter('forminator_field_markup', function( $html ) { // The file to download in landing pages if ( get_post_type( get_the_id() ) == 'landing' ) { $file_url = get_field('fichier', $post_id); if ( ! empty( $file_url ) ) { $html = str_replace( '%file_url%', $file_url, $html ); } } return $html; }, 99);
When I look into the HTML, the URL is correctly filled. But when we submit the form, the redirect URL is :
https://my-website.com/url-of-my-landing-page/%file_url%
And in the mail in place of the URL, it print the variable %file_url%Please can you help me to resolve this?
Thank you!
The page I need help with: [log in to see the link]
- The topic ‘Field in redirect and email print variable instead of field content’ is closed to new replies.