vtiger Forum Index vtiger
The Honest Open Source CRM
 

Web Form's not working quite right???
Click here to go to the original topic

 
       vtiger Forum Index -> General Discussions
Previous topic :: Next topic  
Author Message
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 :)
Back to top  
Hockey



Joined: 12 Jul 2008
Posts: 7

Posted: Thu Jul 17, 2008 5:42 am    Post subject: Web Form  

I can't seem to find the edit or delete button so I"ll say, I have it all figured out now, thanks :)
Back to top  
 
       vtiger Forum Index -> General Discussions
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.15 © 2001, 2002 phpBB Group