Customer Service

Resources that you can use.....

Knowledgebase

KnowledgeBase Articles

Articles Categories Screencasts

How can I get Leads into OpenCRM from a contact form on my website? How do the OpenCRM contact forms work and how do I customise them? Applies to All versions

Updated: 31 October 2011 11:19:48 OpenCRM::Leads OpenCRM::Data Import-Export

Importing Leads into OpenCRM from a web form on your website

It is possible to post information gathered on a contact form on your website directly into your OpenCRM system. First of all you will need the web form package which can be obtained by contacting us at support@opencrm.co.uk.

Next you will need a friendly web developer, a bit of web development knowledge yourself, or, some professional service time from us to help you get this set up (and this guide of course...)

From this point on, we will assume that you have all of the above and are ready to go...

Note : The web to lead form that we provide interacts directly with your Leads module in OpenCRM, It is therefore very important that you protect the form from SPAM attacks, including SPAM robots. If you have any doubt about what this means or the implications to your system, please speak to your Software Add-ons Project Manager.

 

Standard Installation

The standard installation procedure assumes that you run PHP4 or PHP5 on your webserver. . If you do not and can not run PHP on your webserver  please proceed to instructions for Alternate Installation.

1. Extract the contents of the web form package for the relevant version of PHP that you are running to a folder on your website. Make sure that it is possible to run PHP scripts from this folder. If in doubt, ask your web developer or hosting company. Keep all of the files together. Do not move individual files into different locations.

2. The form is pre-configured to work "out of the box" but you will need to tell it the URL of your OpenCRM system so it knows where to post the data. in form_config.php change the following variable to be your OpenCRM login URL, e.g. https://mysite.opencrm.co.uk .

$Server_Path = 'http://localhost';

You may also wish to change the "PATH_TO_PRIVACY_PAGE"  variable to point to your own privacy page URL.

3. In order for OpenCRM to accept your forms submission, we need to authorise the IP address of your web server, so you will need to provide us with that. If you are not sure what this address is, place the following piece of PHP script somewhere on the leadform.php file and it will tell you!

echo "IP ADDRESS:".$_SERVER['SERVER_ADDR'];

 

Customisation

Customising the lead form

Although the form comes with some basic formatting, you may wish to modify this and remove any fields that are not relevant. You may also wish to add additional form verification and "pre-processing" - spam checks etc. You can do this by editing leadform.php

The form by default contains all of the fields that it is possible to post to in OpenCRM. You can remove as many as are not relevant, but you must not change the field names of the ones that you do wish to use - or they will not then post through to OpenCRM. If you wish to post to any additional fields, you will need to contact us so we can modify the OpenCRM form processing to accept additional fields.

Customising the thank you message

You can customise the thank you message by editing thankyou.php. You can customise this to your hearts content. So long as the end result is valid PHP this will work.

Alternatively, you may wish to make a small modification to send_data.php and change the following line to instead do a redirect to another page on your website, but, you're on your own on that one!

include("thankyou.php");

Further / advanced customisation?

If you know your way around a PHP script, you will soon be familiar with what the lead forms do and how they work - there is nothing too complicated about them. As such you can customise and change them as much as you like. You may wish to introduce an intermediary processing script in between the leadform submit and the send_data.php processing. Feel free!

You may wish to make modifications to send_data.php to add in some extra processing (e.g. to also send an email to someone to notify them of the form submission).

Alternatively, we can add extra processing on our side too, so please contact us with your requirements and we will see how we can help. This may require some professional service time dependent on your requirements.

 

Alternative Installation (What to do if you don't have PHP)

If you do not have PHP available to you on your webserver, or there is some other reason why the above is just not working for you - don't worry, an alternative method is available.

It is possible for us to host the form processing code for you as part of your OpenCRM installation. All you need to handle is the building of your own contact form.

You can design and build your web form in whatever language you feel comfortable in, and then just make sure that your form method is "post" and the form action points to the URL of the form processing code in your OpenCRM system. This will be e.g:

https://mysite.opencrm.co.uk/webforms/send_data.php

So, for example,  your .asp form might look something like this:


Please see the next section of this article for a list of field names that you are able to post into OpenCRM.

As with the standard installation, we will need from you the IP address of the server making the form submission so we can allow it to post leads into your OpenCRM system. You may need to speak to your web hosts if you do not know how to get this. Alternatively, we may be able to detect this from the incoming request, so if you have no luck, contact our support desk.

As the form processing is handled by us, any changes required to the thank you page/message or the redirect on success process, or any additional process would need to be done by us too. We may be able to do this for you as part of your support contract, but any significant or complicated changes may require professional services time to implement.

It's always best to run your requirements by us first so we can let you know in advance if you are going to need any professional service time.

 

Available Fields for Manual Form submission

Whether you are using the Standard installation with some customisation, or the Alternative installation method, the following fields can be posted to in OpenCRM. You must use the field names specified, or the form processing code in OpenCRM will not know what to do with the values passed through.

First name : contact_firstname
Last name : contact_lastname
Email : contact_email
Phone : contact_phone
Street : contact_street
Town : contact_city
County : contact_state
Postcode : contact_postcode
Country : contact_country
Description / Notes : contact_description
Lead Type : contact_leadtype
Industry / Sector : contact_industrytype

  • Rate This Article

  • Feedback and Comments
    captcha code  


You may also be interested in:


More..