Skip to main content

fdk-contact

Deprecation Notice

Vue-based themes will soon be deprecated. Please switch to React-based themes, as all future updates and support will focus exclusively on React.

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

KeyTypeDescriptionPayload
addFormfunctionHandler 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);
}

Was this section helpful?