Need a little help with Radio button which needs to link to a page

Hi There,

I am trying to create a page where Radio button should decide the next button to direct to page 1 or page 2. Is this something possible?

For example: on the website " ", When user click on company review and next, it should direct to company_review_1 and when user click on salary and next button, user needs to direct to company_review_2 page.

Is it possible?


I did something similar with a drop down menu (it is fairly a simple process)

on the page section code this:

// For full API documentation, including code examples, visit Velo API Reference -
import wixLocation from “wix-location”; //importing location of selection (which option was chosen)

//TODO: write your page related code here.

export function dropdown1_change(event,$w) { //onChange event
let option = $w(“#dropdown1”).value; //getting the value of the dropdown
if (option === “Producer / Processor”) { //if option 1 is chosen“/producer”); //redirect to here
} else if (option === “Hospitality”) {“/hospitality”);
} else if (option === “Retail / Distribution”) {“/retail”);
} else {“/food”);

hope this helps (:

Thanks for this.

I have tried to use below code(based on yours) and it is not working. Is it something i do wrong?

// For full API documentation, including code examples, visit

$w.onReady(function () {
	//TODO: write your page related code here...

import wixLocation from "wix-location";
export function button3_click(event,$w) {
  let option = $w("#radioGroup1").value;
  if (option === "company_review") { //if option 1 is chosen"/Company_Review_1"); //redirect to here
     } else if (option === "salary") {"/Company_Review_2");
     } else if (option === "interview_review") {"/Company_Review_3");
     } else if (option === "benefits") {"/Company_Review_4");
     } else {"/home");

first mistake: import wix location needs to be the first thing in the code (on top of the on.Ready function)

button 3_click needs to be replaced with the ID of the radio section (guessing it is radioGroup1)

it needs to be an onChange selector and not a click (as you are changing the value of the radio button option) make sure that the onchange is added to the radio button (right click view properties and add it from there)

i would also remove the empty onready function

1 Like

Thanks Mariona, It worked. Great help. :slight_smile:

1 Like