Hockey
Joined: 12 Jul 2008
Posts: 7
|
| Posted: Thu Jul 17, 2008 5:13 am Post subject: Web Form's not working quite right??? |
|
|
I downloaded the examples and got everything working...
1. If one doesn't need to specify a key in the config.php script how do I prevent bots from submitting their forms to my CRM installation?
2. I have the following trimmed down code and it's working but the description is ending up with the phone number and the first/lastname is not working at all...
What are the exact names of the fields I can submit and does order matter?
Code:
require_once('nusoap/lib/nusoap.php');
$ServerPath = 'http://crm.somedomain.com';
$client = new soapclient2("$ServerPath/vtigerservice.php?service=webforms", false, $proxyhost, $proxyport, $proxyusername, $proxypassword);
list($firstname, $lastname) = explode(' ', stripslashes($_POST['fullname']));
$phone = stripslashes($_POST['p1'].'-'.$_POST['p2'].'-'.$_POST['p3']);
$email = stripslashes($_POST['email']);
$company = stripslashes($_POST['company_name']);
$website = stripslashes($_POST['website']);
$description = stripslashes($_POST['comments']);
$params = array(
'firstname' => "$firstname",
'lastname' => "$lastname",
'email' => "$email",
'phone' => "$phone",
'company' => "$company",
'website' => "$website",
'description' => "$description",
'assigned_user_id' => "$assigned_user_id"
);
$result = $client->call('create_lead_from_webform', $params, $ServerPath, $ServerPath);
echo $result;
Help :) |
|