Hi
I'm working to get Form Builder to pass lead information to vTiger.
I can use the 'arbitrary form action' field to call my php post file ok.
I have some confusion regarding mapping of field names to the names I need them to be. - Do I use the 'Field Alias and DOM id (CSS id) attribute' entry in advanced settings to do this? (map field names).
Thanks
vtiger form integration in cms made simple form builder
Re: vtiger form integration in cms made simple form builder
Not enough information to help.
Don't know the required API info of vTiger.
Don't know the required API info of vTiger.
Re: vtiger form integration in cms made simple form builder
Thanks Jeff
Actually, vtiger generates html code of the form. Normally I would just copy-pasted it in my page.
All I need to know is how to enter this code in form builder.
I copy the example of the code below:
Actually, vtiger generates html code of the form. Normally I would just copy-pasted it in my page.
All I need to know is how to enter this code in form builder.
I copy the example of the code below:
Code: Select all
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<form name="Lead Capture" action="http://my-company.be/modules/Webforms/capture.php" method="post" accept-charset="utf-8" enctype="multipart/form-data"><input type="hidden" name="__vtrftk" value="sid:40de4f0914355a8631ae20f0b8e19b5dc854cc8a,1462520789">
<input type="hidden" name="publicid" value="d976b3ec08fd77ffecc2ffecca4dd6a7">
<input type="hidden" name="name" value="Lead Capture">
<input type="hidden" name="VTIGER_RECAPTCHA_PUBLIC_KEY" value="RECAPTCHA PUBLIC KEY FOR THIS DOMAIN">
<table>
<tbody><tr>
<td><label>Last Name*</label></td><td>
<input type="text" name="lastname" value="" required=""> </td></tr>
<tr>
<td><label>Primary Phone</label></td><td>
<input type="text" name="phone" value=""> </td></tr>
<tr>
<td><label>Primary Email*</label></td><td>
<input type="email" name="email" value="" required=""> </td></tr>
<tr>
<input type="submit" value="Submit">
</form>
<__script__ type="text/javascript">window.onload = function() { var N=navigator.appName, ua=navigator.userAgent, tem;var M=ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);if(M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1];M=M? [M[1], M[2]]: [N, navigator.appVersion, "-?"];var browserName = M[0];var form = document.forms[0], inputs = form.elements; form.onsubmit = function() { var required = [], att, val; for (var i = 0; i < inputs.length; i++) { att = inputs[i].getAttribute("required"); val = inputs[i].value; type = inputs[i].type; if(type == "email") {if(val != "") {var elemLabel = inputs[i].getAttribute("label");var emailFilter = /^[_/a-zA-Z0-9]+([!"#$%&()*+,./:;<=>?\^_`{|}~-]?[a-zA-Z0-9/_/-])*@[a-zA-Z0-9]+([\_\-\.]?[a-zA-Z0-9]+)*\.([\-\_]?[a-zA-Z0-9])+(\.?[a-zA-Z0-9]+)?$/;var illegalChars= /[\(\)\<\>\,\;\:\"\[\]]/ ;if (!emailFilter.test(val)) {alert("For "+ elemLabel +" field please enter valid email address"); return false;} else if (val.match(illegalChars)) {alert(elemLabel +" field contains illegal characters");return false;}}}if (att != null) { if (val.replace(/^\s+|\s+$/g, "") == "") { required.push(inputs[i].getAttribute("label")); } } } if (required.length > 0) { alert("The following fields are required: " + required.join()); return false; } var numberTypeInputs = document.querySelectorAll("input[type=number]");for (var i = 0; i < numberTypeInputs.length; i++) { val = numberTypeInputs[i].value;var elemLabel = numberTypeInputs[i].getAttribute("label");if(val != "") {var intRegex = /^[+-]?\d+$/;if (!intRegex.test(val)) {alert("For "+ elemLabel +" field please enter valid number"); return false;}}}}; }</__script>