Please use code-tags to make your code better readable…like this…
// API Reference: https://www.wix.com/corvid/reference// “Hello, World!” Example: https://www.wix.com/corvid/hello-world$w.onReady(function () {// Write your JavaScript here// To select an element by ID use: $w("#elementID")// Click "Preview" to run your code});import wixLocation from'wix-location';exportfunction registrationForm1_wixFormSubmit() {if ($w('#checkbox1').checked===true ) {console.log ("CHECKBOX is CHECKED"), wixLocation.to("/members-choice")}else {console.log ("CHECKBOX is UNCHECKED"), wixLocation.to("/application");}}exportfunction registrationForm1_wixFormSubmitted() {if ($w('#checkbox1').checked===true ) {console.log ("CHECKBOX is CHECKED"), wixLocation.to("/members-choice")}else {console.log ("CHECKBOX is UNCHECKED"), wixLocation.to("/application");}}
As you can see, this happens when i try to copy your code (which was not edited with CODE-Tags) and paste it again into CODE-tags.
You surely do not want to read such a terrible CODE-STRUCTURE, right? 
Ok, one more time…(this is your CODE…)
// API Reference: https://www.wix.com/corvid/reference
// “Hello, World!” Example: https://www.wix.com/corvid/hello-world
$w.onReady(function () {
// Write your JavaScript here
// To select an element by ID use: $w("#elementID")
// Click "Preview" to run your code
});
import wixLocation from 'wix-location';
export function registrationForm1_wixFormSubmit() {
if ($w('#checkbox1').checked===true ) {console.log ("CHECKBOX is CHECKED"), wixLocation.to("/members-choice")}
else {console.log ("CHECKBOX is UNCHECKED"), wixLocation.to("/application");
}}
export function registrationForm1_wixFormSubmitted() {
if ($w('#checkbox1').checked===true ) {console.log ("CHECKBOX is CHECKED"), wixLocation.to("/members-choice")}
else {console.log ("CHECKBOX is UNCHECKED"), wixLocation.to("/application");
}}
- At first, we DELETE all that unnecessary CODE-LINES
// API Reference: https://www.wix.com/corvid/reference
// “Hello, World!” Example: https://www.wix.com/corvid/hello-world
// Write your JavaScript here
// To select an element by ID use: $w("#elementID")
// Click "Preview" to run your code
- Then we give the code a better CODE-STRUCTURE…
import wixLocation from 'wix-location';
$w.onReady(function() {
//.....your CODE here.......
})
GOOD-STRUCTURE !!!! ---> CODE is very good readable
export function registrationForm1_wixFormSubmitted() {
if ($w('#checkbox1').checked===true ) {
console.log ("CHECKBOX is CHECKED"), wixLocation.to("/members-choice")
}
else {console.log ("CHECKBOX is UNCHECKED"), wixLocation.to("/application");
}
BAD-STRUCTURE !!!! ---> CODE gets less readable!
export function registrationForm1_wixFormSubmit() {
if ($w('#checkbox1').checked===true ) {console.log ("CHECKBOX is CHECKED"), wixLocation.to("/members-choice")}
else {console.log ("CHECKBOX is UNCHECKED"), wixLocation.to("/application");
}
- Now we have a good CODE-STRUCTURE… (very good readable!)
import wixLocation from 'wix-location';
$w.onReady(function() {
//.....your CODE here.......
})
GOOD-STRUCTURE !!!! ---> CODE is very good readable
export function registrationForm1_wixFormSubmitted() {
if ($w('#checkbox1').checked===true ) {
console.log ("CHECKBOX is CHECKED"), wixLocation.to("/members-choice")
}
else {console.log ("CHECKBOX is UNCHECKED"), wixLocation.to("/application");}
}
BAD-STRUCTURE !!!! ---> CODE gets less readable!
export function registrationForm1_wixFormSubmit() {
if ($w('#checkbox1').checked===true ) {
console.log ("CHECKBOX is CHECKED"), wixLocation.to("/members-choice")
}
else {console.log ("CHECKBOX is UNCHECKED"), wixLocation.to("/application");}
}
- import…code-line is always on the very TOP of your CODE.
import wixLocation from 'wix-location';
- do not mix EXPORT-FUNCTIONS with normal FUNCTIONS, or put them on wrong places
WRONG ! ! !
$w.onReady(function() {
export function registrationForm1_wixFormSubmit() {
if ($w('#checkbox1').checked===true ) {
console.log ("CHECKBOX is CHECKED"), wixLocation.to("/members-choice")
}
else {console.log ("CHECKBOX is UNCHECKED"), wixLocation.to("/application");}
}
})
RIGHT-way ! ! !
$w.onReady(function() {
})
export function registrationForm1_wixFormSubmit() {
if ($w('#checkbox1').checked===true ) {
console.log ("CHECKBOX is CHECKED"), wixLocation.to("/members-choice")
}
else {console.log ("CHECKBOX is UNCHECKED"), wixLocation.to("/application");}
}
- There are 2-ways how to code…
a) This way, by using EXPORT-FUNCTIONS and connect them in your EDITOR.
export function registrationForm1_wixFormSubmit() {
if ($w('#checkbox1').checked===true ) {
console.log ("CHECKBOX is CHECKED"), wixLocation.to("/members-choice")
}
else {console.log ("CHECKBOX is UNCHECKED"), wixLocation.to("/application");}
}
b)… ohhhhh ok, you already found a SOLUTION, well done!
But take a look of what i was writing here, it will help you a lot to understand coding better…