Hi,
You are trying to use the WooCommerce integration with the CFF in the wrong direction.
The WooCommerce add-on, in the developer version of the plugin, allows to integrate a form with a specific product of WooCommerce. So, you can create the forms as usual, and then, integrate the form with specifics products, from the products edition.
If you want to create a form, and redirect to the user to specific products, in function to values entered through the input fields, you can create a form, independient of the WooCommerce products, like in the following example:
I’ll assume that your form includes two numeric fields: fieldname1, and fieldname2, and can occur any of following cases:
– If fieldname1 is equal to 1 and fieldname2 is equal to 1, redirect to the user to: https://www.yourdomain.com/product1.html
– If fieldname1 is equal to 1 and fieldname2 is equal to 2, redirect to the user to: https://www.yourdomain.com/product2.html
– If fieldname1 is equal to 2 and fieldname2 is equal to 1, redirect to the user to: https://www.yourdomain.com/product3.html
– If fieldname1 is equal to 2 and fieldname2 is equal to 2, redirect to the user to: https://www.yourdomain.com/product4.html
Now, you should follow the steps below:
1. Untick the option: “Eval dynamically the equations associated to the calculated fields”, from the “Form Settings” tab of form builder.
2. Select the option: “No”, in the attribute: “Display submit button?” in the form’s settings.
3. Inserts a button field in the form, and select, the “Calculate” option as the button type.
4. Inserts a calculated field in the form, and tick the option: “Hide Field From Public Page”, because the new field is not relevant in the form’s interface.
5. Finally, enter the following equation associated to the calculated field:
(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';
})()
and that’s all.
Best regards.