Redirect user to external URL using input from the user

Hey!

In your case you could try using wixLocation.to https://www.wix.com/corvid/reference/wix-location.html#to and conditional statements https://www.w3schools.com/jsref/jsref_if.asp

It will look something like this:

import wixLocation from ‘wix-location’;

$w.onReady(function () {
let userinput = $w(“#input1”).value
$w(“#button1”).onClick((event) => {
if ($w(“#input1”).value === “Something”) {
wixLocation.to(“/${userinput}”)
}
})
})