Redirect to a form based on input

Looking to have customers fill out a radio button question and Depending on the choice they submit, I would like to redirect to one of 3 forms. Is this possible?

yes
custom form and corvid.

send me a reply message if you like to hire me for making it for you.

This isn’t a forum where you advertise yourself for paid work, this is a forum where we freely help other Wix Corvid users to try to achieve what they are asking or to guide them in the right direction so that they can accomplish it on their own.

Mariona, have a look at these previous posts as it gives you same sample ideas of how to do it.
https://www.wix.com/corvid/forum/community-discussion/drop-down-list-select-and-link-to-page
https://www.wix.com/corvid/forum/community-discussion/redirect-user-to-certain-page-based-if-checkbox-is-checked-or-not

If you are still struggling with the code then please come back and post here again and somebody on this forum will try to help you for free without advertising themselves.

An easy way that I have done it on a previous website is to simply have a dropdown user input and have the user choose where to go from that choice.

Wix Website Own Pages.

The Page
User Input: #payChoice ​​
Button Element: #bookNow

Wix Pages:
Online Payment Page: /paynow
Order Form Page: /paylater

Page Code

import wixLocation from "wix-location";

$w.onReady(function () {
});

export function bookNow_click(event, $w) {
        let option = $w("#payChoice").value;
        if ( option === "Pay Now" ) {
             wixLocation.to("/paynow");
        } else {
             wixLocation.to("/paylater");
    }
}

External Sites.

The Page
User Input: #websiteChoice
Button Element: #choiceButton

External URLs:
website1:
website2:

Page Code

import wixLocation from "wix-location";

$w.onReady(function () {
}); 

export function choiceButton_click(event, $w) {
        let option = $w("#websiteChoice").value;
​
        if ( option === "website1" ) {
             wixLocation.to("<insert URL1>");
        } else {
             wixLocation.to("<insert URL2>");
    }
}

You will find all the needed info in the Wix API Reference with sample codes shown, just use the search function within it if you can’t find the appropriate section that you need.
https://www.wix.com/corvid/reference/

thank you @givemeawhisky i really appreciate your help… does this mean that I can’t use a form app but i should build the form from the user inputs in wix?

You can still use Wix Forms app, although note that it is a Wix app and you might not always be able to get code to work with some of the app settings as it might simply override your code etc.
https://support.wix.com/en/article/about-wix-forms
https://support.wix.com/en/ascend-by-wix/wix-forms

However, for complete control over your user input forms and to be able for them to fully work with code on your page, then yes you are much better making up your own forms and utilising the user inputs and code.
https://support.wix.com/en/article/creating-a-form-with-user-input-elements
https://www.youtube.com/watch?v=VyMsDTwge18
https://support.wix.com/en/article/about-user-input-elements
https://support.wix.com/en/article/setting-labels-and-values-for-radio-buttons-and-dropdown-lists

You can find a lot of info from the Wix Support sections and also the Wix Corvid section itself too.
https://support.wix.com/en/
https://support.wix.com/en/corvid-by-wix/basics

Any issues with code on your site, then come back to this forum and post a new issue again.

Any issue with the Wix Editor itself or settings from within the Editor, then you are best suited going through Wix Support themselves.
https://support.wix.com/en/about-wix/contacting-wix-support

// For full API documentation, including code examples, visit Velo API Reference - Wix.com
import wixLocation from “wix-location”;
$w.onReady( function () {
//TODO: write your page related code here…

});

export function dropdown1_click(event, $w) {
let option = $w(“#dropdown1”).value;
if (option === “Producer / Processor”) {
wixLocation.to(“/producer”);
} else if (option === “Hospitality”) {
wixLocation.to(“/hospitality”);
} else if (option === “Retail / Distribution”) {
wixLocation.to(“/retail”);
} else {
wixLocation.to(“/food”);
}
}

i have a problem because when you hover on any of the drop down options it would just redirect to food, not even letting you choose an option. Is there something wrong with my code?

Don’t put the onClick event handler on the dropdown element itself, you will need to have a simple button that the user has to click on to go to the appropriate dropdown option, as shown in the examples shown above with the code too.

If you want to use the dropdown element itself then you are better off using onChange instead.
https://www.wix.com/corvid/reference/$w.Dropdown.html#onChange

onChange worked perfectly thank you! gonna be a little bit picky here… is there any way of letting the users hit the continue button before redirecting them to a different page ? the thing is there is another question before the dropdown question and with the onChange you can leave the first question out and it will still redirect you to the page, which shouldn’t be the case

Yes take the onChange event handler off the dropdown and simply save the dropdown value in your dataset as you probably are doing anyway, if not then simply use Wix Storage to save it.
https://www.wix.com/corvid/reference/wix-storage.html

Then the user can fill in all the questions on the form and then when the form is submitted and saved etc, then you can pull that dropdown value back up and use code again to direct them to the appropriate page.

Or another option is to move that question with the dropdown to be answered after all the questions have been filled in and submitted, then you can simply enable the dropdown when the form has been submitted and have the user moved onto the appropriate page again.

how would you disable a question and only enable it if the previous question has been answered? i looked around in the forum and in the documentation and I didn’t find anything

There are many pages in the forum for this type of thing, just have a search for them like these.
https://www.wix.com/corvid/reference/$w.TextInput.html
https://www.wix.com/corvid/forum/community-discussion/multiple-inputs-enable-and-disable-a-button
https://www.wix.com/corvid/forum/community-discussion/enable-disable-a-button-when-user-didn-t-fill-out-the-form
https://www.wix.com/corvid/forum/community-discussion/enable-a-form-submit-button-if-all-input-elements-are-valid
https://www.wix.com/corvid/forum/community-discussion/how-to-disable-enable-a-text-input-box-based-on-different-radio-button-selections-using-wix-forms

Just have a look at them and others and see if you can take code and change it to suit your own needs on your page.

based on your suggestions I coded this but it is still not working :

√// For full API documentation, including code examples, visit Velo API Reference - Wix.com
import wixLocation from “wix-location”;
$w.onReady( function () {
$w (“#dropdown1”).disable();
//TODO: write your page related code here…

});

export function radioGroup2_change(event){

let selectedIndex = $w(“#dropdown1”).selectedIndex;

if (selectedIndex>=2){

    $w("#dropdown1").show(); 

}  **else** { 
$w("#dropdown1").disable(); 
} 

}

export function dropdown1_change(event,$w) {
let option = $w(“#dropdown1”).value;
if (option === “Producer / Processor”) {
wixLocation.to(“/producer”);
} else if (option === “Hospitality”) {
wixLocation.to(“/hospitality”);
} else if (option === “Retail / Distribution”) {
wixLocation.to(“/retail”);
} else {
wixLocation.to(“/food”);
}
}

Please Help > Radio Button Selection Value Populate In Another Field

I thought this would be easier than it has been but it seems I’m not either reading the right How To’s or missing something.

I have a radio button field set with 4 selections. Each selection has a different value. Im trying to get the value to appear in a separate box or field on the form.

EXAMPLE
Drop down
Choice 1 - value 1
Choice 2 - value 2
Choice 3 - value 3
Choice 4 - value 4

The user selects Choice 1, id like the value “1” to then populate in another field or box.

Any suggestuons?
Thank you in advance.

First question → so which element you are using now?

I have a radio button field set with 4 selections.

EXAMPLE

Drop down

Choice 1 - value 1

Choice 2 - value 2

Choice 3 - value 3

Choice 4 - value 4

  1. Dropdown
    2 or Radio-button ?

For DROPDOWNS you have the following possibilities…

  1. by VALUE —>
let selectedValue = $w("#myDropdown").value; console.log(selectedValue);
  1. by INDEX —>
let selectedIndex = $w("#myDropdown").selectedIndex; console.log(selectedIndex);

Now you have another element, which you want to be populated by the selected value of the dropDown…

$w(‘#myOtherElementForExampleTextBox’).text = selectedValue