Requirements
------------
Drupal 5.x, SugarCRM 5.0.x
PHP cURL library

Installation
------------
1. Copy the sugarwebform directory to the Drupal modules directory for your site

2. Within your Sugar instance, go to:
	
		Campaigns -> Create Lead Form
	 
	 Create a lead form with the desired fields, team, user and campaign.  Generate the form and
	 extract the following information from it: (search for the words below to avoid sifting through
	 the messy code)
	 
	 	- action URL (search for action=)
	 	- assigned_user_id
	 	- team_id
	 	- campaign_id
	 	- field names for the desired fields
	 	
	 Okay, you've completed the most difficult part of this setup.	 	

3. Login to your Drupal as an administrator. Enable the module in the "administer" -> "build" -> "modules"

4. Go to the SugarWebForm module settings (admin/settings/sugarwebform) and add the information from 
	 step 2 above.  These will define our default Sugar instance, user assigned to, team, and campaign.
	 These values can later be overwritten by the webform fields (except the action URL)
	 
5. Now create a webform.  This should be filled out like any other webform, with one change.  Add the following
	 line to the Webform Advanced Settings -> Additional Processing field:
	 
	  <?php 
	  	if(function_exists('sugarwebform_process')) {
	  		sugarwebform_process($form_id, $form_values);
	  	}
	  ?>

6. Add components to your webform.  IMPORTANT: Each component you add that will be passed into Sugar should be 
	 named to match the Sugar field. (i.e. last_name)  You can then change the label to be a more readable
	 name.

