<span class="resolved" aria-label="Resolved" title="Topic is resolved."></span>Variable on onclick event of button field

[ad_1]

Replies: 1

Hi, regarding the topic https://projectdmc.org/support/topic/how-do-i-make-cff-work-like-an-html-form/
and the code here below that goes into onclick event of button field

redirectToURL('https://www.your-website.com/page/', {param1:getField('fieldname1').val(), param2:getField('fieldname2').val(), param3:getField('fieldname3').val()});

I am struggling to have as variable the URL (in the above example ‘https://www.your-website.com/page/) of the site to be reached.
So for instance if value for fieldname1 is 1, I want URL to be https://www.mysite.com, if value for fieldname1 is 2 then I want https://www.othersite.com

How you manage that?

 

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