mlarge
Forum Replies Created
-
I have a form on one page of my site that contains the code below. I have another form on one of the redirect pages below. I would like to import the data from the first form (fieldname1 and fieldname2) into the new form on the redirect page. Is that possible?
(function(){
var a = fieldname1;
var b = fieldname2;if(a == 1 && b == 1) document.location.href = ‘https://www.yourdomain.com/product1.html’;
if(a == 1 && b == 2) document.location.href = ‘https://www.yourdomain.com/product2.html’;
if(a == 2 && b == 1) document.location.href = ‘https://www.yourdomain.com/product3.html’;
if(a == 2 && b == 2) document.location.href = ‘https://www.yourdomain.com/product4.html’;
})();Hi, I’m having issues trying to import data into another form field. The above is for the Thank you page only. My form redirects to several pages. Do you have a solution for this type of integration?
Hi, thanks so much for your help above.
Is there anyway to do the same calculation above but also capture the information entered in the form and into the new URL page that contains another form to fill out their personal information (name, email, number) ? We need the information filled in the two fields to be emailed to us after the user submits their personal information.
Thx
I figured out the issue on the form. In your code you forgot a semi-colon at the end of the code. When I added this to the code, it worked! Thanks so much for your help.
(function(){
var a = fieldname1;
var b = fieldname2;if(a == 1 && b == 1) document.location.href = ‘https://www.yourdomain.com/product1.html’;
if(a == 1 && b == 2) document.location.href = ‘https://www.yourdomain.com/product2.html’;
if(a == 2 && b == 1) document.location.href = ‘https://www.yourdomain.com/product3.html’;
if(a == 2 && b == 2) document.location.href = ‘https://www.yourdomain.com/product4.html’;
})();Great, sent you a private support message.
Thanks
Is there anyway I can email you privately because this is in production?
I do have that option unticked and it opens the form on preview then redirects me to the URL. It won’t allow me to enter in any values. How can I fix this issue?
Hi,
Thanks for your help!
Just an FYI – I tried to use the example above to direct the user to another URL but when I went to preview and test the form, it automatically directed to a URL. It wouldn’t allow me to enter in any numbers in the fields because it redirected me to a URL when I went to preview. How can i fix this issue? I need to be able to enter the numbers in the two fields in the form, then click on “next” to then direct to a specific url?
thanks
Hi,
Can the “next” button be custom coded with the calculation above? (- If fieldname1 is equal to 1 and fieldname2 is equal to 1, redirect to the user to: https://www.yourdomain.com/product1.html) etc…
After it redirects to that page with the product details and another next button, will that still be a part of the same form?
Thanks
This is great!! Thanks for explaining this in further detail. Is there another way to do this with the same instance above except there would be a “next” button below the product details then this takes them to purchase the product where they enter in name, phone, email and credit card information then a terms and condition check box?
So, it’s more like steps in the form…
User enters in numbers in two fields (same calculation above) with “next” button below
Step One – Review product details and total price (previous and next button)
Step Two – Purchase Product (Fill in name, phone, credit card options, Terms and conditions)Thanks,
M