© 2015 X2Engine Inc.

Difference between revisions of "Web Lead Capture via API (legacy; pre-3.5.6)"

From X2Engine
Jump to: navigation, search
(Created page with "Category:Development == Introduction == Our web lead from editor allows for some solid forms that the average user can put on their website without much issue. Little to n...")
(No difference)

Revision as of 23:03, 27 September 2013

Introduction

Our web lead from editor allows for some solid forms that the average user can put on their website without much issue. Little to no development knowledge is required, and the form integrates perfectly with X2 from a web lead standpoint as well as our web tracker. But for some users, this isn't enough. Many websites already have forms in use that they don't want to sacrifice or change, but still want all of the features of X2 integration. The good news is that with some basic development knowledge this is a very doable project. This article will walk you through setting up a custom web lead capture script which will take POST data from your web lead form and enter it into X2 via API. The later sections of the article will cover some advanced customizations to make the form work better for you.

The Basics

The first thing you'll need to do is create some form of capture script, and call it whatever you like. I tend to use things like "contactForm" to be very clear what it is. This script should go onto the same webserver as your X2CRM installation so that cookies can be properly set, but it doesn't need to be in the same folder. You'll also need to make sure that the "APIModel.php" class file is somewhere accessible. This file is provided in protected/models/ of your X2 installation, and can be copied to anywhere you like. So, what does this capture script currently look like?

Test