Safari issues on Custom code form

hello all
I have a custom code form, I have no issues with it when using it on a desktop or android device. The only issue is with safari/apple products. when I click on the submit button my form emails and also sends the data to the database. The email and data insert is not working when using safari but works fine with desktops or androids. Can someone please look at my code and help me please! Thanks!

Well what code…

sorry my first time using this forum, wasn’t sure if others could access my code or not. Here it is

$w.onReady( () => {
$w(“#dataset1”).onReady( () => {
$w(“#dataset1”).save()
.then( (item) => {
let fieldValue = item.fieldName;
} )
. catch ( (err) => {
let errMsg = err;
} );

} );
$w(“#dataset1”).onError( (operation, error) => {
let errorOp = operation; “save”

let errorCode = error.code; “DS_VALIDATION_ERROR”

let errorMessage = error.message;
DatasetError: “Some of the elements validation failed”
} );
} );

import wixLocation from ‘wix-location’;
$w.onReady( function () {
//TODO:
});

export function button1_click(event, $w)
//1 on 1
//1 on 1 1 athlete
{
if (
$w(‘#dropdown7’).value === ‘1-on-1 Training’ &&
$w(‘#dropdown3’).value === ‘1’ &&
$w(‘#dropdown8’).value === ‘12 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/1on11mo1athlete”);
} else
if ($w(‘#dropdown7’).value === ‘1-on-1 Training’ &&
$w(‘#dropdown3’).value === ‘1’ &&
$w(‘#dropdown8’).value === ‘3 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/1on13mo1athletes”);

}  **else**  

if ( $w(‘#dropdown7’).value === ‘1-on-1 Training’ &&
$w(‘#dropdown3’).value === ‘1’ &&
$w(‘#dropdown8’).value === ‘6 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/1on16mo1athlete”);

} 

//small Group
//Small Group 1 athlete
else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup1mo1athlete”);
} else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup3mo1athlete”);

}  **else** 

if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup6mo1athlete”);

} 

//Small Group 2 athletes
else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup1mo2athletes”);
} else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup3mo2athletes”);

}  **else** 

if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup6mo2athletes”);

} 

//Small Group 3 athlete
else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup1mo3athletes”);
} else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup3mo3athletes”);

}  **else** 

if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup6mo3athletes”);

} 

//Team Training

//Team 1 athlete
else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtrainig1mo1athlete”);
} else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining3mo1athlete”);

}  **else** 

if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining6mo1athlete”);

} 

//Team Training 2 athletes
else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining1mo2athletes”);
} else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining3mo2athletes”);

}  **else** 

if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining6mo2athletes”);

} 

//Team Training 3 athlete
else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining1mo3athletes”);
} else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining3mo3athletes”);

}  **else** 

if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining6mo3athletes”);

} 

else
wixLocation.to(“https://www.gamechangerzu.com”);
}

//choices

export function dropdown7_change(event, $w) {

// Number of Athlete Boxes:

if ($w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown3’).value === ‘2’)
$w(‘#dropdown3’).expand(),$w(‘#input19’).expand(),$w(‘#input2’).expand(),$w(‘#input20’).expand(),$w(‘#input21’).expand(), $w(‘#dropdown2’).expand(), $w(‘#dropdown11’).expand(), $w(‘#dropdown12’).expand(),
$w(‘#input7’).expand(),$w(‘#input22’).expand(),$w(‘#input23’).expand(), $w(‘#dropdown4’).expand(), $w(‘#datePicker1’).expand(), $w(‘#datePicker2’).expand(),
$w(‘#dropdown13’).expand(), $w(‘#dropdown14’).expand(), $w(‘#datePicker3’).collapse(), $w(‘#input8’).collapse(),$w(‘#input24’).collapse(),$w(‘#input25’).collapse(), $w(‘#dropdown5’).collapse(), $w(‘#dropdown15’).collapse(), $w(‘#dropdown16’).collapse();

else if ($w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown3’).value === ‘2’)
$w(‘#dropdown3’).expand(),$w(‘#input19’).expand(),$w(‘#input2’).expand(), $w(‘#input20’).expand(),$w(‘#input21’).expand(),$w(‘#dropdown2’).expand(), $w(‘#dropdown11’).expand(), $w(‘#dropdown12’).expand(),
$w(‘#input7’).expand(),$w(‘#input22’).expand(),$w(‘#input23’).expand(), $w(‘#dropdown4’).expand(), $w(‘#datePicker1’).expand(), $w(‘#datePicker2’).expand(), $w(‘#dropdown13’).expand(),
$w(‘#dropdown14’).expand(), $w(‘#datePicker3’).collapse(), $w(‘#input8’).collapse(), $w(‘#input24’).collapse(),$w(‘#input25’).collapse(),$w(‘#dropdown5’).collapse(), $w(‘#dropdown15’).collapse(), $w(‘#dropdown16’).collapse();

else if ($w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown3’).value === ‘3’)
$w(‘#dropdown3’).expand(),$w(‘#input19’).expand(),$w(‘#input2’).expand(),$w(‘#input20’).expand(),$w(‘#input21’).expand(), $w(‘#dropdown2’).expand(), $w(‘#dropdown11’).expand(), $w(‘#dropdown12’).expand(),
$w(‘#input7’).expand(),$w(‘#input22’).expand(),$w(‘#input23’).expand(), $w(‘#dropdown4’).expand(), $w(‘#datePicker1’).expand(), $w(‘#datePicker2’).expand(), $w(‘#dropdown13’).expand(),
$w(‘#dropdown14’).expand(), $w(‘#datePicker3’).expand(), $w(‘#input8’).expand(),$w(‘#input24’).expand(),$w(‘#input25’).expand(), $w(‘#dropdown5’).expand(), $w(‘#dropdown15’).expand(), $w(‘#dropdown16’).expand();

else if ($w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown3’).value === ‘3’)
$w(‘#dropdown3’).expand(),$w(‘#input19’).expand(),$w(‘#input2’).expand(), $w(‘#input20’).expand(),$w(‘#input21’).expand(),$w(‘#dropdown2’).expand(), $w(‘#dropdown11’).expand(), $w(‘#dropdown12’).expand(),
$w(‘#input7’).expand(), $w(‘#input22’).expand(),$w(‘#input23’).expand(),$w(‘#dropdown4’).expand(), $w(‘#datePicker1’).expand(), $w(‘#datePicker2’).expand(), $w(‘#dropdown13’).expand(),
$w(‘#dropdown14’).expand(), $w(‘#datePicker3’).expand(), $w(‘#input8’).expand(), $w(‘#input24’).expand(),$w(‘#input25’).expand(), $w(‘#dropdown5’).expand(), $w(‘#dropdown15’).expand(), $w(‘#dropdown16’).expand();

else if ($w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown3’).value === ‘1’)
$w(‘#dropdown3’).expand(),$w(‘#input19’).expand(),$w(‘#input2’).expand(),$w(‘#input20’).expand(),$w(‘#input21’).expand(), $w(‘#dropdown2’).expand(), $w(‘#datePicker1’).expand(),
$w(‘#dropdown11’).expand(), $w(‘#dropdown12’).expand(), $w(‘#input7’).collapse(),$w(‘#input22’).collapse(),$w(‘#input23’).collapse(),
$w(‘#dropdown4’).collapse(), $w(‘#datePicker3’).collapse(), $w(‘#input8’).collapse(),$w(‘#input24’).collapse(),$w(‘#input25’).collapse(),
$w(‘#dropdown5’).collapse(), $w(‘#datePicker2’).collapse(), $w(‘#dropdown13’).collapse(),
$w(‘#dropdown14’).collapse(), $w(‘#dropdown15’).collapse(), $w(‘#dropdown16’).collapse();

else if ($w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown3’).value === ‘1’)
$w(‘#dropdown3’).expand(),$w(‘#input19’).expand(),$w(‘#input2’).expand(), $w(‘#input20’).expand(),$w(‘#input21’).expand(),$w(‘#dropdown2’).expand(), $w(‘#datePicker1’).expand(),
$w(‘#dropdown11’).expand(), $w(‘#dropdown12’).expand(), $w(‘#input7’).collapse(),$w(‘#input22’).collapse(),$w(‘#input23’).collapse(),
$w(‘#dropdown4’).collapse(), $w(‘#datePicker3’).collapse(), $w(‘#input8’).collapse(),$w(‘#input24’).collapse(),$w(‘#input25’).collapse(),
$w(‘#dropdown5’).collapse(), $w(‘#datePicker2’).collapse(), $w(‘#dropdown13’).collapse(),
$w(‘#dropdown14’).collapse(), $w(‘#dropdown15’).collapse(), $w(‘#dropdown16’).collapse();

else if ($w(‘#dropdown7’).value === ‘1-on-1 Training’)
$w(‘#dropdown3’).collapse(),$w(‘#input19’).collapse(),$w(‘#input2’).expand(), $w(‘#input20’).expand(),$w(‘#input21’).expand(),$w(‘#dropdown2’).expand(), $w(‘#datePicker1’).expand(),
$w(‘#dropdown11’).expand(), $w(‘#dropdown12’).expand(), $w(‘#input7’).collapse(),$w(‘#input22’).collapse(),$w(‘#input23’).collapse(),
$w(‘#dropdown4’).collapse(), $w(‘#datePicker3’).collapse(), $w(‘#input8’).collapse(),$w(‘#input24’).collapse(),$w(‘#input25’).collapse(),
$w(‘#dropdown5’).collapse(), $w(‘#datePicker2’).collapse(), $w(‘#dropdown13’).collapse(),
$w(‘#dropdown14’).collapse(), $w(‘#dropdown15’).collapse(), $w(‘#dropdown16’).collapse(),$w(‘#input3’).placeholder = ‘1’;

else
$w(‘#dropdown3’).expand(),$w(‘#input19’).expand(),$w(‘#input2’).collapse(),$w(‘#input20’).collapse(),$w(‘#input21’).collapse(), $w(‘#dropdown2’).collapse(), $w(‘#dropdown11’).collapse(), $w(‘#dropdown12’).collapse(),
$w(‘#input7’).collapse(),$w(‘#input22’).collapse(),$w(‘#input23’).collapse(), $w(‘#dropdown4’).collapse(), $w(‘#input8’).collapse(),$w(‘#input24’).collapse(),$w(‘#input25’).collapse(),
$w(‘#dropdown5’).collapse(), $w(‘#datePicker1’).collapse(), $w(‘#datePicker2’).collapse(), $w(‘#datePicker3’).collapse(), $w(‘#dropdown11’).collapse(), $w(‘#dropdown12’).collapse(), $w(‘#dropdown15’).collapse(), $w(‘#dropdown16’).collapse();
//////////////////////////////////////////////////////////////////////

////////////////////////////////////////////
//PRICING
//1 on 1
//1 on 1 1 athlete
//225 per month, 6 month gets a free month, 12 months get 3 free months —bi-weekly payment totals shown below
{
if ( $w(‘#dropdown7’).value === ‘1-on-1 Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$84.38”;
} else
if ( $w(‘#dropdown7’).value === ‘1-on-1 Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$112.50”;

    }  **else** 

if ( $w(‘#dropdown7’).value === ‘1-on-1 Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$93.75”;
}

//small Group//10% off
//225 per month, 6 month gets a free month, 12 months get 3 free months
//Small Group 1 athlete
//2 to 5 players//
else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$75.94”;
} else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$101.25”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “84.38”;
}
//Small Group 2 athletes
else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$151.88”;
} else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$202.50”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$168.50”;
}
//Small Group 3 athlete
else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$227.82”;
} else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$303.75”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$253.13”;

    } 

//Team Training

//Team 1 athlete
//15% off
//225 per month, 6 month gets a free month, 12 months get 3 free months //6 or more athletes

else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$71.72”;
} else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$95.63”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$79.69”;
}
//Team Training 2 athletes
else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$143.44”;
} else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$191.25”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$159.38”;

    } 

//Team Training 3 athlete
else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$215.16”;
} else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$286.88”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$239.07”;
}
}}

// Allergies text box on yes
$w.onReady( function () {
//TODO:
});
export function radioGroup1_change(event, $w) {
if ($w(‘#radioGroup1’).value === ‘Yes’)
$w(‘#textBox1’).expand(), $w(‘#text8’).expand();
else if ($w(‘#radioGroup1’).value === ‘No’)
$w(‘#textBox1’).collapse(), $w(‘#text8’).collapse();

}

// Inhaler text box on yes
$w.onReady( function () {
//TODO:
});
export function radioGroup2_change(event, $w) {
if ($w(‘#radioGroup2’).value === ‘Yes’)
$w(‘#textBox2’).expand(), $w(‘#text10’).expand();
else if ($w(‘#radioGroup2’).value === ‘No’)
$w(‘#textBox2’).collapse(), $w(‘#text10’).collapse();
}

//email on submission

import {
sendEmail,
sendEmailWithRecipient
} from ‘backend/email’;

$w.onReady( function () {
$w(“#button1”).onClick(sendFormData);
// $w(“#dataset1”).onAfterSave(sendFormData);
});

//
function sendFormData() {
const subject = ${$w("#input1").value} Thank you **for** registering **with** GameChangerz University;
const body = `${$w(“#input1”).value},

`;
const recipient = $w(“#input9”).value;

sendEmailWithRecipient(subject, body, recipient) 
    .then(response => console.log(response)); 

sendEmail(subject, body) 
    .then(response => console.log(response)); 

}

///////////////////////////////PRICING CHANGES SECTION/////////////////////////////////////////////////

export function dropdown8_change(event, $w) {

////////////////////////////////////////////
//PRICING
//1 on 1
//1 on 1 1 athlete
//225 per month, 6 month gets a free month, 12 months get 3 free months —bi-weekly payment totals shown below
{
if ( $w(‘#dropdown7’).value === ‘1-on-1 Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$84.38”;
} else
if ( $w(‘#dropdown7’).value === ‘1-on-1 Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$112.50”;

    }  **else** 

if ( $w(‘#dropdown7’).value === ‘1-on-1 Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$93.75”;
}

//small Group//10% off
//225 per month, 6 month gets a free month, 12 months get 3 free months
//Small Group 1 athlete
//2 to 5 players//
else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$75.94”;
} else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$101.25”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “84.38”;
}
//Small Group 2 athletes
else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$151.88”;
} else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$202.50”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$168.50”;
}
//Small Group 3 athlete
else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$227.82”;
} else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$303.75”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$253.13”;

    } 

//Team Training

//Team 1 athlete
//15% off
//225 per month, 6 month gets a free month, 12 months get 3 free months //6 or more athletes

else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$71.72”;
} else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$95.63”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$79.69”;
}
//Team Training 2 athletes
else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$143.44”;
} else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$191.25”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$159.38”;

    } 

//Team Training 3 athlete
else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$215.16”;
} else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$286.88”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$239.07”;
}

}

}

//////////////////
export function dropdown3_change(event)

////////////////////////////////////////////
//PRICING
//1 on 1
//1 on 1 1 athlete
//225 per month, 6 month gets a free month, 12 months get 3 free months —bi-weekly payment totals shown below
{
if ( $w(‘#dropdown7’).value === ‘1-on-1 Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$84.38”;
} else
if ( $w(‘#dropdown7’).value === ‘1-on-1 Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$112.50”;

    }  **else** 

if ( $w(‘#dropdown7’).value === ‘1-on-1 Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$93.75”;
}

//small Group//10% off
//225 per month, 6 month gets a free month, 12 months get 3 free months
//Small Group 1 athlete
//2 to 5 players//
else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$75.94”;
} else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$101.25”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “84.38”;
}
//Small Group 2 athletes
else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$151.88”;
} else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$202.50”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$168.50”;
}
//Small Group 3 athlete
else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$227.82”;
} else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$303.75”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$253.13”;

    } 

//Team Training

//Team 1 athlete
//15% off
//225 per month, 6 month gets a free month, 12 months get 3 free months //6 or more athletes

else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$71.72”;
} else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$95.63”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$79.69”;
}
//Team Training 2 athletes
else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$143.44”;
} else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$191.25”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$159.38”;

    } 

//Team Training 3 athlete
else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
$w(‘#input18’).placeholder = “$215.16”;
} else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
$w(‘#input18’).placeholder = “$286.88”;

    }  **else** 

if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
$w(‘#input18’).placeholder = “$239.07”;
}
// Number of Athlete Boxes:
// Number of Athlete Boxes:

if ($w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown3’).value === ‘2’)
$w(‘#dropdown3’).expand(),$w(‘#input19’).expand(),$w(‘#input2’).expand(),$w(‘#input20’).expand(),$w(‘#input21’).expand(), $w(‘#dropdown2’).expand(), $w(‘#dropdown11’).expand(), $w(‘#dropdown12’).expand(),
$w(‘#input7’).expand(), $w(‘#input22’).expand(),$w(‘#input23’).expand(),$w(‘#dropdown4’).expand(), $w(‘#datePicker1’).expand(), $w(‘#datePicker2’).expand(),
$w(‘#dropdown13’).expand(), $w(‘#dropdown14’).expand(), $w(‘#datePicker3’).collapse(), $w(‘#input8’).collapse(),$w(‘#input24’).collapse(),$w(‘#input25’).collapse(), $w(‘#dropdown5’).collapse(), $w(‘#dropdown15’).collapse(), $w(‘#dropdown16’).collapse();

else if ($w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown3’).value === ‘2’)
$w(‘#dropdown3’).expand(),$w(‘#input19’).expand(),$w(‘#input2’).expand(),$w(‘#input20’).expand(),$w(‘#input21’).expand(), $w(‘#dropdown2’).expand(), $w(‘#dropdown11’).expand(), $w(‘#dropdown12’).expand(),
$w(‘#input7’).expand(), $w(‘#input22’).expand(),$w(‘#input23’).expand(),$w(‘#dropdown4’).expand(), $w(‘#datePicker1’).expand(), $w(‘#datePicker2’).expand(), $w(‘#dropdown13’).expand(),
$w(‘#dropdown14’).expand(), $w(‘#datePicker3’).collapse(), $w(‘#input8’).collapse(), $w(‘#input24’).collapse(),$w(‘#input25’).collapse(),$w(‘#dropdown5’).collapse(), $w(‘#dropdown15’).collapse(), $w(‘#dropdown16’).collapse();

else if ($w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown3’).value === ‘3’)
$w(‘#dropdown3’).expand(),$w(‘#input19’).expand(),$w(‘#input2’).expand(),$w(‘#input20’).expand(),$w(‘#input21’).expand(), $w(‘#dropdown2’).expand(), $w(‘#dropdown11’).expand(), $w(‘#dropdown12’).expand(),
$w(‘#input7’).expand(), $w(‘#input22’).expand(),$w(‘#input23’).expand(),$w(‘#dropdown4’).expand(), $w(‘#datePicker1’).expand(), $w(‘#datePicker2’).expand(), $w(‘#dropdown13’).expand(),
$w(‘#dropdown14’).expand(), $w(‘#datePicker3’).expand(), $w(‘#input8’).expand(),$w(‘#input24’).expand(),$w(‘#input25’).expand(), $w(‘#dropdown5’).expand(), $w(‘#dropdown15’).expand(), $w(‘#dropdown16’).expand();

else if ($w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown3’).value === ‘3’)
$w(‘#dropdown3’).expand(),$w(‘#input19’).expand(),$w(‘#input2’).expand(),$w(‘#input20’).expand(),$w(‘#input21’).expand(),$w(‘#dropdown2’).expand(), $w(‘#dropdown11’).expand(), $w(‘#dropdown12’).expand(),
$w(‘#input7’).expand(), $w(‘#input22’).expand(),$w(‘#input23’).expand(),$w(‘#dropdown4’).expand(), $w(‘#datePicker1’).expand(), $w(‘#datePicker2’).expand(), $w(‘#dropdown13’).expand(),
$w(‘#dropdown14’).expand(), $w(‘#datePicker3’).expand(), $w(‘#input8’).expand(), $w(‘#input24’).expand(),$w(‘#input25’).expand(),$w(‘#dropdown5’).expand(), $w(‘#dropdown15’).expand(), $w(‘#dropdown16’).expand();

else if ($w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown3’).value === ‘1’)
$w(‘#dropdown3’).expand(),$w(‘#input19’).expand(),$w(‘#input2’).expand(), $w(‘#input20’).expand(),$w(‘#input21’).expand(),$w(‘#dropdown2’).expand(), $w(‘#datePicker1’).expand(),
$w(‘#dropdown11’).expand(), $w(‘#dropdown12’).expand(), $w(‘#input7’).collapse(),$w(‘#input22’).collapse(),$w(‘#input23’).collapse(),
$w(‘#dropdown4’).collapse(), $w(‘#datePicker3’).collapse(), $w(‘#input8’).collapse(),$w(‘#input24’).collapse(),$w(‘#input25’).collapse(),
$w(‘#dropdown5’).collapse(), $w(‘#datePicker2’).collapse(), $w(‘#dropdown13’).collapse(),
$w(‘#dropdown14’).collapse(), $w(‘#dropdown15’).collapse(), $w(‘#dropdown16’).collapse();

else if ($w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown3’).value === ‘1’)
$w(‘#dropdown3’).expand(),$w(‘#input19’).expand(),$w(‘#input2’).expand(),$w(‘#input20’).expand(),$w(‘#input21’).expand(), $w(‘#dropdown2’).expand(), $w(‘#datePicker1’).expand(),
$w(‘#dropdown11’).expand(), $w(‘#dropdown12’).expand(), $w(‘#input7’).collapse(),$w(‘#input22’).collapse(),$w(‘#input23’).collapse(),
$w(‘#dropdown4’).collapse(), $w(‘#datePicker3’).collapse(), $w(‘#input8’).collapse(),$w(‘#input24’).collapse(),$w(‘#input25’).collapse(),
$w(‘#dropdown5’).collapse(), $w(‘#datePicker2’).collapse(), $w(‘#dropdown13’).collapse(),
$w(‘#dropdown14’).collapse(), $w(‘#dropdown15’).collapse(), $w(‘#dropdown16’).collapse();

else if ($w(‘#dropdown7’).value === ‘1-on-1 Training’)
$w(‘#dropdown3’).collapse(),$w(‘#input19’).collapse(),$w(‘#input2’).expand(), $w(‘#input20’).expand(),$w(‘#input21’).expand(),$w(‘#dropdown2’).expand(), $w(‘#datePicker1’).expand(),
$w(‘#dropdown11’).expand(), $w(‘#dropdown12’).expand(), $w(‘#input7’).collapse(),$w(‘#input22’).collapse(),$w(‘#input23’).collapse(),
$w(‘#dropdown4’).collapse(), $w(‘#datePicker3’).collapse(), $w(‘#input8’).collapse(),$w(‘#input24’).collapse(),$w(‘#input25’).collapse(),
$w(‘#dropdown5’).collapse(), $w(‘#datePicker2’).collapse(), $w(‘#dropdown13’).collapse(),
$w(‘#dropdown14’).collapse(), $w(‘#dropdown15’).collapse(), $w(‘#dropdown16’).collapse(),$w(‘#input3’).placeholder = ‘1’;

else
$w(‘#dropdown3’).expand(),$w(‘#input19’).expand(),$w(‘#input2’).collapse(), $w(‘#input20’).collapse(),$w(‘#input21’).collapse(),$w(‘#dropdown2’).collapse(), $w(‘#dropdown11’).collapse(), $w(‘#dropdown12’).collapse(),
$w(‘#input7’).collapse(),$w(‘#input22’).collapse(),$w(‘#input23’).collapse(), $w(‘#dropdown4’).collapse(), $w(‘#input8’).collapse(),$w(‘#input24’).collapse(),$w(‘#input25’).collapse(), $w(‘#dropdown5’).collapse(), $w(‘#datePicker1’).collapse(), $w(‘#datePicker2’).collapse(), $w(‘#datePicker3’).collapse(), $w(‘#dropdown11’).collapse(), $w(‘#dropdown12’).collapse(), $w(‘#dropdown15’).collapse(), $w(‘#dropdown16’).collapse();

}

/////hide submit button
$w.onReady( function () {
$w(‘#input1’).onChange(formChanged)
$w(‘#input2’).onChange(formChanged)
$w(‘#input4’).onChange(formChanged)
$w(‘#input3’).onChange(formChanged)
$w(‘#input5’).onChange(formChanged)
$w(‘#input9’).onChange(formChanged)
$w(‘#input6’).onChange(formChanged)
$w(‘#input10’).onChange(formChanged)
$w(‘#input11’).onChange(formChanged)
$w(‘#dropdown1’).onChange(formChanged)
$w(‘#dropdown3’).onChange(formChanged)
$w(‘#input19’).onChange(formChanged)
$w(‘#dropdown2’).onChange(formChanged)
$w(‘#dropdown11’).onChange(formChanged)
$w(‘#dropdown10’).onChange(formChanged)
$w(‘#input12’).onChange(formChanged)
$w(‘#input13’).onChange(formChanged)
$w(‘#input4’).onChange(formChanged)
$w(‘#input15’).onChange(formChanged)
$w(‘#input16’).onChange(formChanged)
$w(‘#input17’).onChange(formChanged)
$w(‘#input12’).onChange(formChanged)
$w(‘#dropdown7’).onChange(formChanged)
$w(‘#dropdown8’).onChange(formChanged)
$w(‘#radioGroup1’).onChange(formChanged)
$w(‘#radioGroup2’).onChange(formChanged)
$w(‘#datePicker1’).onChange(formChanged)

});

function formChanged() {
const input1valid = $w(‘#input1’).valid
const input7valid = $w(‘#input7’).valid
const input8valid = $w(‘#input8’).valid
const input2valid = $w(‘#input2’).valid
const input4valid = $w(‘#input4’).valid
const input3valid = $w(‘#input3’).valid
const input5valid = $w(‘#input5’).valid
const input9valid = $w(‘#input9’).valid
const input6valid = $w(‘#input6’).valid
const input10valid = $w(‘#input10’).valid
const input11valid = $w(‘#input11’).valid
const dd1valid = $w(‘#dropdown1’).valid
const dd3valid = $w(‘#dropdown3’).valid
const input19valid = $w(‘#input19’).valid
const dd2valid = $w(‘#dropdown2’).valid
const dd11valid = $w(‘#dropdown11’).valid
const dd10valid = $w(‘#dropdown10’).valid
const input12valid = $w(‘#input12’).valid
const input13valid = $w(‘#input13’).valid
const input14valid = $w(‘#input14’).valid
const input15valid = $w(‘#input15’).valid
const input16valid = $w(‘#input16’).valid
const input17valid = $w(‘#input17’).valid
const input18valid = $w(‘#input18’).valid
const input20valid = $w(‘#input20’).valid
const input21valid = $w(‘#input21’).valid
const input22valid = $w(‘#input22’).valid
const input23valid = $w(‘#input23’).valid
const input24valid = $w(‘#input24’).valid
const input25valid = $w(‘#input25’).valid
const dd7 = $w(‘#dropdown7’).valid
const dd8 = $w(‘#dropdown8’).valid
const dd4 = $w(‘#dropdown4’).valid
const dd5 = $w(‘#dropdown5’).valid
const dd10 = $w(‘#dropdown10’).valid
const dd11 = $w(‘#dropdown11’).valid
const dd12 = $w(‘#dropdown12’).valid
const dd13 = $w(‘#dropdown13’).valid
const dd14 = $w(‘#dropdown14’).valid
const dd15 = $w(‘#dropdown15’).valid
const dd16 = $w(‘#dropdown16’).valid
const dd17 = $w(‘#dropdown17’).valid
const rr1 = $w(‘#radioGroup1’).valid
const rr2 = $w(‘#radioGroup2’).valid
const date1 = $w(‘#datePicker1’).valid
const date2 = $w(‘#datePicker2’).valid
const date3 = $w(‘#datePicker3’).valid

const isFormValid = input1valid && input2valid &&input3valid && input4valid && input5valid &&
input6valid && input7valid &&input8valid && input9valid && input10valid && input11valid && input12valid & input13valid &&
input14valid && input15valid && input16valid && input17valid
&& input18valid && input19valid && input20valid && input21valid&& input22valid&& input23valid && input24valid && input25valid
&& dd10valid && dd11valid && dd12 && dd13 && dd14 && dd15 && dd16 && dd17
&& dd10valid && dd11valid && dd4 && dd2valid && dd5
&& dd7 && dd8 && rr1 && rr2 && date1 && date2 && date3

if (isFormValid) {
($w(‘#button1’).enable() && $w(‘#text45’).hide());
} else {
($w(‘#button1’).disable() && $w(‘#text45’).show())

}

}

// Inhaler text box on yes
$w.onReady( function () {
if ($w(‘#button1’).enable )
$w(‘#text45’).show();
else if ($w(‘#button1’).disable )
$w(‘#text45’).hide();
}
)

Is that all one page of code?!

For starters, this line should be at the top.
import wixLocation from ‘wix-location’;

Plus, you can only have the one onReady function underneath your imports to get the page ready.

Also, why are you calling a dataset save straight after your page’s onReady function?
$w(" #dataset1 ").save()

Also, have a look at the Wix API references for show and hide and expand and collapse.
https://www.wix.com/corvid/reference/$w.HiddenMixin.html
https://www.wix.com/corvid/reference/$w.HiddenCollapsedMixin.html

Plus, why not see if you can group in a container or strip or similar, some of those dropdowns and/or the inputs so that you can cut down on the amount of code by simply collapsing or expanding a container or strip for example.

Also, if you are doing send an email on form submission, then please use the tutorial here.
https://support.wix.com/en/article/corvid-tutorial-sending-an-email-on-form-submission

Or use the triggered email to contacts or members instead.
https://support.wix.com/en/article/corvid-tutorial-sending-a-triggered-email-to-contacts
https://support.wix.com/en/article/corvid-tutorial-sending-a-triggered-email-to-members

Thanks for your knowledge, I am all new to this, most of this code I googled my way through so it might be a mess. Where do you suggest I move the onsave to? I am moving the import wixlocation to the top as you mentioned and the onready after the import line.

thats a good idea I didnt know we had containers to work with !

I moved the items as you suggested.
I tested on safari and the email or data insert still does not happen, Everything is still working fine on desktop and androids

The save function is for saving things into a dataset like user inputs from a form instead of using Wix own submit button, see here for more info about the save api.
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#save

For using a Wix submit button see here for more info.
https://support.wix.com/en/article/adding-a-submit-button-to-your-form

Also, where you are trying to save in your code?

As for the email, if you are doing a triggered email then it needs to be written in code as like the example I had posted already.

Also, if you are doing send an email on form submission, then please use the tutorial here.
https://support.wix.com/en/article/corvid-tutorial-sending-an-email-on-form-submission

Or use the triggered email to contacts or members instead.
https://support.wix.com/en/article/corvid-tutorial-sending-a-triggered-email-to-contacts
https://support.wix.com/en/article/corvid-tutorial-sending-a-triggered-email-to-members

You are best breaking up your site into separate pages so that you don’t need to have so much code on the one page, especially if you are wanting to use a triggered email option.

You will find a good many code examples here already provided by Wix themselves and there are many more that are not listed here.
https://www.wix.com/corvid/examples

Plus, simply use the search function at the top right of this forum to find previous posts about code things as they can often contain blocks of code that you are needing for your own site.

The code is all for a registration form, I would not want them going to other pages to register.

Hello
I have limited it down to my wixlocation.to code
REMEMBER this is only an issue in safari , when I take out this portion the data inserts to database and email gets sent, I use this to send a user to a page with a paypal button and the correct amount to pay

can you review this portion of code to see if you see anything that could be wrong.
Here is that section of code

export function button1_click(event, $w)
//1 on 1
//1 on 1 1 athlete
{
if (
$w(‘#dropdown7’).value === ‘1-on-1 Training’ &&
$w(‘#dropdown3’).value === ‘1’ &&
$w(‘#dropdown8’).value === ‘12 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/1on11mo1athlete”);
} else
if ($w(‘#dropdown7’).value === ‘1-on-1 Training’ &&
$w(‘#dropdown3’).value === ‘1’ &&
$w(‘#dropdown8’).value === ‘3 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/1on13mo1athletes”);

}  **else**  

if ( $w(‘#dropdown7’).value === ‘1-on-1 Training’ &&
$w(‘#dropdown3’).value === ‘1’ &&
$w(‘#dropdown8’).value === ‘6 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/1on16mo1athlete”);

} 

//small Group
//Small Group 1 athlete
else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup1mo1athlete”);
} else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup3mo1athlete”);

}  **else** 

if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup6mo1athlete”);

} 

//Small Group 2 athletes
else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup1mo2athletes”);
} else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup3mo2athletes”);

}  **else** 

if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup6mo2athletes”);

} 

//Small Group 3 athlete
else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup1mo3athletes”);
} else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup3mo3athletes”);

}  **else** 

if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Small Group Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/smallgroup6mo3athletes”);

} 

//Team Training

//Team 1 athlete
else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtrainig1mo1athlete”);
} else
if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining3mo1athlete”);

}  **else** 

if ($w(‘#dropdown3’).value === ‘1’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining6mo1athlete”);

} 

//Team Training 2 athletes
else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining1mo2athletes”);
} else
if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining3mo2athletes”);

}  **else** 

if ($w(‘#dropdown3’).value === ‘2’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining6mo2athletes”);

} 

//Team Training 3 athlete
else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘12 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining1mo3athletes”);
} else
if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘3 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining3mo3athletes”);

}  **else** 

if ($w(‘#dropdown3’).value === ‘3’ && $w(‘#dropdown7’).value === ‘Team Training’ && $w(‘#dropdown8’).value === ‘6 Month Commitment’) {
wixLocation.to(“https://www.gamechangerzu.com/teamtraining6mo3athletes”);

} 

else
wixLocation.to(“https://www.gamechangerzu.com”);
}

one more thing I still get redirected to the correct url but the insert and email don’t work on button click