Sunday, August 16, 2020

Contact Form 7 to API Wordpress Plugin

A PHP script, which contains a group of functions that can be added to a WordPress website. It can extend the functionality of WordPress website & also can add new features to WordPress website.

It written in PHP programming language. In WordPress, a lot of plugins available for free at the official WordPress plugin directory. Many third party companies develop commercial  WordPress plugins that are not free.

Today, we are going to know about "Contact Form 7 to API" plugin.

In WordPress, Contact Form 7 is very popular free plugin to make forms with mail functionality. In today's time, companies want to get forms data in their own CRM(Customer Relationship Management). Normally, Contact Form 7 have no option to send their form data to any third party API. In that case, we use one more plugin "Contact Form 7 to API" to send contact form data to API.

To use this plugin, Go to plugin section and click on Add New and search "Contact Form 7 to API".



Click On "Install Now" button And after that click on "Activate". After Activation, Go to contact form, Open any form. You can see one more tab "API Integration" will display.






Here, tick on "Send to API?"
In "Base url", Put your third party API url, where you want to send your data. If any secret key is present with API then you can put in "Basic auth".
Select "Input type" as JSON. Select your API method either GET or POST.
In JSON template box, put your JSON structure and change your value.




One more option is "DEBUG LOG". In this section, you can check, what value send to API. It will display in "Params" box.

Sometimes, in contact form, dropdown option presents and third party API wants some other value in options, what they set in their API. For example,

<select name="email">
    <option value="admin@gmail.com">Admin</option>
    <option value="manager@gmail.com">Manager</option>
    <option value="tech@gmail.com">Technical Head</option>
</select> 

So, this can be handle in Contact Form 7.
[select email "Choose User" "Admin | admin@gmail.com" "Manager | manager@gmail.com" "Technical Head | tech@gmail.com"]

If you have any question or any help, please write us on phpeasysolutions@gmail.com

No comments:

Post a Comment

Copyright © 2019 Tech Location BD. All Right Reserved