1. create a custom field, say “Loan Purpose” in the Leads module. In my forms, I’ll call this “loanpurpose”
2. Using phpmyadmin, browse to the Table: vtiger_leadscf
3. Look at the custom field name for the field in question - mine was called cf_453 This is the field name to be used in webforms.php
4. The name cf_453 only needs to be used in webforms.php, for the other files, call it something friendly - here I used loanpurpose.
5. assign like this:
index.php: add the field name loanpurpose to the line starting with: function create_lead_from_webform
In my implementation, used a drop down list in the form like this:
<tr><th>Loan Purpose:</th>
<td><select name="loanpurpose">
<option value="Purchase">Purchase</option>
<option value="Refi - Rate,Term">Refi - Rate,Term</option>
<option value="Refi - Cash-out">Refi - Cash-out</option>
<option value="Second">Second</option>
<option value="Other">Other</option>
</select></td>
</tr>
send_data.php: add the line(s) for the new field
'loanpurpose'=>"$loanpurpose"
webforms.php: Add in both places:
if($_REQUEST['create'] == 'lead') function:
$loanpurpose = $_POST['loanpurpose'];
and at
$params = array(
$focus->column_fields['cf_453'] = $loanpurpose; *<-- this is where the new form value gets mapped to the custom field ID.*
Any errors encountered will be from typo’s, missing “.” or “,” after the new field entries, wrong field names or a missing addition - look for where the other fields are passed and that is the best start for troubleshooting.






0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment