Answer the question
In order to leave comments, you need to log in
Vue how to send an email if the form is successfully completed?
Hello everyone, there is the following form for sending data to vue:
submitForm: function (e) {
var t = this;
this.$refs[e].validate((function (e) {
if (!e) return !1;
t.btnLoading = !0, l["a"].refund({
payId: t.payId,
type: t.model.type,
amount: t.model.amount
}).then((function (e) {
var a = e.data;
a.status ? (t.$notify({
title: "Success",
message: "This is a success message",
type: "success"
}), t.$emit("success", {})) : t.$notify.error({
title: "Error",
message: a.errors.join("<br>"),
dangerouslyUseHTMLString: !0
}), t.btnLoading = !1
}))
}))
}
Answer the question
In order to leave comments, you need to log in
You are at the front. You process the form on the back, in the same place do the sending of the Message if everything went well.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question