Dynamically evaluate a single variable

So I have the setup where I have a calculated field:

redirectToURL('https://www.somesite.com/search/'+myvar+'+'+fieldname4)

Which is triggered by a “calculate” button. i.e. dynamically evaluate is turned off in the form settings. “myvar” is a variable that is created in the shortcode (if that matters).

This works and it sucessfully redirects to the URL, and evaluates myvar and fieldname4 on button click.

However, I also need it so that the text on the button itself contains the “myvar” value, but of course this can’t happen because I’m not dynamically evaluating.

Is there a way to still make the button redirect to the URL as above, but also for the button to contain the “myvar” value as soon as the page loads?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer