Hi All,
I am new to using Wix & trying to find my feet.
I have created a form:
Name:
Gender (dropdown Male or Female):
Age (dropdown list of age groupings Under 18, 18-39, 40-59, 60+):
I have linked the datasets into the database.
I would like the user to be able to click ‘Submit’ and be re-directed to a page that has the following:
Hi
If male “How’s it hanging?”
If female “I hope you are well”
Under 18 “We hope this site is more interesting than the classroom”
18-39 “Thanks for visiting our site”
40-59 “Thanks for visiting our site”
60+ Thanks for visiting our site old timer"
I would really appreciate any advice!!!
Thanks,
Nick
Hi Nick,
Seemingly, there shouldn’t be too much involved with this, but there are actually quite a few steps involved. That’s probably why no one has helped you yet. I have some time today, so here is an approach you could use.
Maybe you have your submit button configured already, but just in case, here are the steps:

This all presupposes that you have a record added already and that your collection has the appropriate permissions (anyone can create content).
Then, the code on the page that this links to could be something like this where there are three text elements:
$w.onReady( () => {
$w("#dataset2").onReady( () => {
let currentRec = $w('#dataset2').getCurrentItem();
$w('#textGreeting').text = "Hi " + currentRec.name;
$w('#textOpeningLine').text = currentRec.gender === "Male" ? "How's it hanging?" : "I hope you are well."
let ThanksFor = currentRec.age === "Under 18" ? "We hope this site is more interesting than the classroom" : "Thanks for visiting our site"
if (currentRec.age === "60+") {
ThanksFor = ThanksFor + " old timer"
}
$w('#textThanksFor').text = ThanksFor;
} );
} );