fdk-contact
Contact Action Component
Tag
fdk-contact
Description
This action component is used to provide the function on the Contact Us page. This contains methods for entering contact information such as email, phone no., name, and comment, and then raise a ticket by making necessary API call.
Props
Key | Type | Description | Payload |
---|---|---|---|
addForm | function | Handler for calling an API to raise tickets on entering necessary details | addForm({ email : string,phone : string, name : string, comment : string} : object) |
Example
<fdk-contact className="submit-btn">
<template slot-scope="contact">
<button
className="submit-button"
@click="saveContactForm(contact)"
>
Submit
</button>
</template>
</fdk-contact>
Here saveContactForm
can be of type:
saveContactForm(contact) {
let body = {
name: this.name.value,
phone: {
code: "91",
number: this.mobile.value,
},
email: this.emailId.value,
comment: this.comment.value,
};
contact
.addForm(body)
.then((res) => {
if (res) {
//code for handling response
}
})
.catch(console.log);
}