Hi,
In the demo Event Switching there is a "product selection" dropdown with 3 choices(first product, second product, third product) and a submit button.
In the Setup there is a Event Switcher in the Submit event.
Is it possible to remove (or hide the submit) and make this work by just selecting one of the options.
So when you select an option, you will be redirected (depending of the choice thanks to the Event Switcher).
ps: I'd like to do it with radio buttons but if it works with the dropdown from the demo, it will work for the radio buttons too. I'll just have to make sure, nothing is selected by default.
In the demo Event Switching there is a "product selection" dropdown with 3 choices(first product, second product, third product) and a submit button.
In the Setup there is a Event Switcher in the Submit event.
Is it possible to remove (or hide the submit) and make this work by just selecting one of the options.
So when you select an option, you will be redirected (depending of the choice thanks to the Event Switcher).
ps: I'd like to do it with radio buttons but if it works with the dropdown from the demo, it will work for the radio buttons too. I'll just have to make sure, nothing is selected by default.
Hi SAGO,
This will need a few lines of custom javascript code, in the radios events use "on selecting" "value" and set the action to "function", set the element identifier to "redirect" then add a custom "JavaScript" element and use this code:
Best regards
This will need a few lines of custom javascript code, in the radios events use "on selecting" "value" and set the action to "function", set the element identifier to "redirect" then add a custom "JavaScript" element and use this code:
function redirect(){
window.location = "http://www.google.com";
}
Best regards
Thank you Max!!!
That worked!
I used the following code because I wanted to submit the form so that the submit-button can be removed.
This might maybe help some who wants to do use radiobuttons, dropdowns,... without a submit-button.
If there is a better way to do it, don't hesitate to correct this.
Thank you again!
Cheers
That worked!
I used the following code because I wanted to submit the form so that the submit-button can be removed.
This might maybe help some who wants to do use radiobuttons, dropdowns,... without a submit-button.
function redirect(){
document.forms[0].submit();
}
If there is a better way to do it, don't hesitate to correct this.
Thank you again!
Cheers
This code
references the first form on the page, you can instead get the form by its id or class:
Best regards
document.forms[0]
references the first form on the page, you can instead get the form by its id or class:
jQuery("#form_id")
Best regards
This topic is locked and no more replies can be posted.