0

I have a webform which enters leads into vtiger crm . The webform is as follows:

<form name="Test" action="http://localhost:8888/modules/Webforms/capture.php" method="post" accept-charset="utf-8">
<p>
    <input type="hidden" name="publicid"      value="9227539ebf714c64888c6f8a26b4c1f9"></input>
    <input type="hidden" name="name" value="Test"></input>
</p>

<p>
    <label>First Name</label>
    <input type="text" value="" name="firstname"  required="true"></input>
</p>
<p>
    <label>Last Name</label>
    <input type="text" value="" name="lastname"  required="true"></input>
</p>
<p>
    <label>Company</label>
    <input type="text" value="" name="company"  required="true"></input>
</p>
<p>
    <label>Country</label>
    <input type="text" value="" name="country"  required="true"></input>
</p>
<p>
    <input type="submit" value="Submit" ></input>
</p>

This form works absolutely fine with the lead getting inserted into my CRM. But, now I want to add/insert multiple leads using a webform like this:

<form name="Test" action="http://localhost:8888/modules/Webforms/capture.php" method="post" accept-charset="utf-8">
<p>
    <input type="hidden" name="publicid" value="9227539ebf714c64888c6f8a26b4c1f9"></input>
    <input type="hidden" name="name" value="Test"></input>
</p>

<p>
    <label>First Name</label>
    <input type="text" value="" name="firstname[]"  required="true"></input>
</p>
<p>
    <label>Last Name</label>
    <input type="text" value="" name="lastname[]"  required="true"></input>
</p>
<p>
    <label>Company</label>
    <input type="text" value="" name="company[]"  required="true"></input>
</p>
<p>
    <label>Country</label>
    <input type="text" value="" name="country[]"  required="true"></input>
</p>


<p>
    <label>First Name</label>
    <input type="text" value="" name="firstname[]"  required="true"></input>
</p>
<p>
    <label>Last Name</label>
    <input type="text" value="" name="lastname[]"  required="true"></input>
</p>
<p>
    <label>Company</label>
    <input type="text" value="" name="company[]"  required="true"></input>
</p>
<p>
    <label>Country</label>
    <input type="text" value="" name="country[]"  required="true"></input>
</p>



<p>
    <input type="submit" value="Submit" ></input>
</p>

In this form, I am trying to add two lead records into the CRM. But this doesn't work. Rather it enters only one record into the CRM like this abc |##| pqr , where 'abc' and 'pqr' are the firstname field entries respectively.

I am completely new to vTiger crm. Please help me out and suggest me some good developer guidebooks. Thanks a lot.

4

1 回答 1

0

您一次只能插入一个潜在客户。capture.php 中的 PHP 代码不准备迭代数组表单字段。您必须执行多个请求才能根据需要输入尽可能多的潜在客户。

于 2013-07-23T06:54:05.710 回答