changes
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user