This commit is contained in:
2025-08-19 18:04:13 +05:45
parent 93d2016ef1
commit f422cba1ac

View File

@@ -202,11 +202,12 @@
const data = await res.json();
if (res.ok) {
form.reset();
toastr.success(data.message || 'Contact Submitted successful!');
window.location.href =
"{{ route('thankyou') }}"; // ✅ redirect instead of toastr
} else if (data.errors && data.errors.email) {
data.errors.email.forEach(msg => toastr.error(msg));
} else {
toastr.error('Submittion failed. Please try again.');
toastr.error('Submission failed. Please try again.');
}
} catch (err) {
console.error(err);
@@ -241,11 +242,12 @@
const data = await res.json();
if (res.ok) {
form.reset();
toastr.success(data.message || 'Contact Submitted successful!');
window.location.href =
"{{ route('thankyou') }}"; // ✅ redirect instead of toastr
} else if (data.errors && data.errors.email) {
data.errors.email.forEach(msg => toastr.error(msg));
} else {
toastr.error('Submittion failed. Please try again.');
toastr.error('Submission failed. Please try again.');
}
} catch (err) {
console.error(err);