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 Version 3.02+ |
||
![]() ![]() ![]() ![]() |
Updated: 31 October 2011 11:20:13 | 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 PHP5 with its built in SOAP functions active 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 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 = 'https://mysite.opencrm.co.uk';
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, the form needs to be authorised to access the API, we will provide 2 API keys to be used. Enter these into the form_config.php
$key = '';
$key2 = '';
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 a selection of 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, these can be added by someone that understands PHP and is comfortable editing the scripts see Further / advanced customisation?.
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 form_config.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!
$PATH_TO_THANK_YOU_PAGE = '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!
There is a function shell already created for PHP based form validation, maybe you want to use a CAPTCHA, this is where we suggest you put any checks in.
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).
If you wish to add fields to the form, or maybe set some default values, you can edit the send_data.php to include these, all it takes is adding a few lines of code for each field
$field_value = Array(); // the next field to be updated
$field_value["name"]="lastname"; // the name of the field
$field_value["value"]=$lastname; // the value to be saved from your form
$field_values[]=$field_value; // add the value to the list
The example above is for the lastname field, and is already included by default. You can find the name for the fields in OpenCRM. If you're wanting to write to a custom field this will be for example 'cf_123'.
Another change you can make is to submit the form data into the Contacts or Company modules instead of Leads, the changes needed for this are commented out in the send_data.php code. If you change the module you are saving to, the field names will also need changing to match those used in the new module.
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, or can't use PHP's SOAP functions)
If you can't use PHP's soap functions we have an alternative webform package with its own built in SOAP client, please contact us to request this version.
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:
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.
You may also be interested in:
- Social Network links on Companies, Contacts and Leads - how do we find usernames from the various Social Media Networks? Updated : 12-04-2013 14:24
OpenCRM::Leads OpenCRM::Contacts OpenCRM::Companies - I want choose some records from a list and export these records only, is there a simple way of doing this? Updated : 14-05-2012 10:01
OpenCRM::Leads OpenCRM::Contacts OpenCRM::Companies How does the Mapping tool work in OpenCRM? I want to see the locations of my Leads, Companies and Contacts on a Map, how do I do this?
Updated : 16-11-2012 12:47
OpenCRM::Leads OpenCRM::Contacts OpenCRM::Companies- How can I change the fields visible on the Basic and Advanced Search screens? Updated : 03-04-2012 15:11
OpenCRM::Leads OpenCRM::Contacts OpenCRM::Activities OpenCRM::Companies OpenCRM::Opportunities OpenCRM::Quotes OpenCRM::Orders::Sales Orders OpenCRM::Orders::Purchase Orders OpenCRM::Invoice OpenCRM::Projects OpenCRM::Helpdesk - I need to bulk update a set of records in OpenCRM, how do I do this? Updated : 17-02-2012 12:47
OpenCRM::Leads OpenCRM::Contacts OpenCRM::Activities OpenCRM::Companies OpenCRM::Opportunities OpenCRM::Quotes OpenCRM::Orders::Sales Orders OpenCRM::Orders::Purchase Orders OpenCRM::Invoice OpenCRM::Projects OpenCRM::Documents OpenCRM::Contracts OpenCRM::Events OpenCRM::Campaigns - How do I code emails in order to track click throughs, enquiries and to automatically manage remove me requests?




Updated : 17-02-2012 11:53
OpenCRM::Leads OpenCRM::Emails OpenCRM::Contacts OpenCRM::Companies OpenCRM::Settings::Templates Hosted::Portal 
What are Action Plans in OpenCRM and how can I use them to get the most out of my OpenCRM solution? And what are Conditional Action Plans?




Updated : 14-05-2012 16:34
OpenCRM::Leads OpenCRM::Emails OpenCRM::Contacts OpenCRM::Activities OpenCRM::Companies OpenCRM::Opportunities OpenCRM::Quotes OpenCRM::Orders::Sales Orders OpenCRM::Orders::Purchase Orders OpenCRM::Invoice OpenCRM::Projects OpenCRM::Helpdesk OpenCRM::Documents OpenCRM::Events OpenCRM::Campaigns OpenCRM::Settings OpenCRM::Settings::Additional- Can round-robin be used to assign records when importing data?


Updated : 14-11-2011 11:00
OpenCRM::Leads OpenCRM::Contacts OpenCRM::Companies OpenCRM::Helpdesk OpenCRM::Settings::Users OpenCRM::Settings::Additional - 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-10-2011 11:19
OpenCRM::Leads OpenCRM::Data Import-Export A tab count shows a " * " and no value, A tab count shows " ~ ". Large tab counts seem a bit inaccurate. How does tab count caching work? Why does opening a record with a large number of linked items take a long time? Why can I only see 1000 records in linked grids?
Updated : 30-03-2013 10:41
OpenCRM::Home OpenCRM::Calendar OpenCRM::Leads OpenCRM::Emails OpenCRM::SMS OpenCRM::Contacts OpenCRM::Activities OpenCRM::Reports OpenCRM::Companies OpenCRM::Opportunities OpenCRM::Quotes OpenCRM::Orders::Sales Orders OpenCRM::Orders::Purchase Orders OpenCRM::Invoice OpenCRM::Projects OpenCRM::Helpdesk OpenCRM::Helpdesk::FAQ OpenCRM::Documents OpenCRM::Products OpenCRM::Products::Stock Items OpenCRM::Dashboards OpenCRM::RSS OpenCRM::Contracts OpenCRM::Personnel OpenCRM::Events OpenCRM::Property OpenCRM::Campaigns OpenCRM::Interface-Display OpenCRM::Settings OpenCRM::Settings::Users OpenCRM::Settings::Templates OpenCRM::Settings::Additional OpenCRM::Settings::Custom Fields OpenCRM::Settings::Google Sync OpenCRM::Portal OpenCRM::Add-in::Outlook OpenCRM::Add-in::Pop2OpenCRM OpenCRM::Add-in::SOAP OpenCRM::Add-in::SageLink OpenCRM::Add-in::Web Form OpenCRM::Add-in::Custom Module/code OpenCRM::Editor OpenCRM::Sage Integration OpenCRM::Phone Integration OpenCRM::Data Import-Export
More..

