Does WebToPerson work?

I set WebToLead up in sugarCE using Joomla to host my website.

I had various forms created in ChronoForms5 on my site and they worked perfectly…

When I try and do the same in SuiteCRM I get nothing.

I’ve searched these forums and only seen posts where people are struggling.

Why has it been changed to WebToPerson and not left as-is in Sugar - seems to have broken it.

I’m happy to concede that I’ve made a mistake - just want to know if people have got this working.

Otherwise its back to sugar - I need this functionality :frowning:

Thanks

Kevin

It should work.
Make sure you have changed the path according to new setup if it is changed.
Can you checkout the log of apache and suitecrm ?

I’m getting “Not a valid module directory” when I run the generated HTML page. That was my start point - It didn’t happen in Sugar.

In the “View Log” in System settings, all I have is this.

“Displaying Log
Your process ID [31186]
Your IP Address is 80.229.184.121Log has not changed”

Nothing in the apache error log related to this.

I have not changed any paths post setup?

What specific log files should I be looking at…my suitecrm log file is empty…

Thanks

Kevin

If possible can you create a dummy form and post it here.

It should be WebToLeadCapture, not the WebToPearsonCapture, It seems you have tried webtoperson and that is missing the moduleDir variable in your form.

Hello there,

I think you are right, it has been changed. if you are trying to do it with new form and you see the above error you need to add below line in your form

<input name="moduleDir" id="moduleDir" type="hidden" value="Leads" />

Hi - WebToLeadCapture is sugar…WebToPersonCapture entry point is Suite…or did I miss something.

I have moduleDir as a hidden field.

Here is my generated html…

<html lang='en_us'>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
	<style type="text/css">
<!--
form#WebToLeadForm, form#WebToLeadForm * {
	margin: 0;
	padding: 0;
	border: none;
	color: #333;
	font-size: 12px;
	line-height: 1.6em;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

form#WebToLeadForm {
	float: left;
	border: 1px solid #ccc;
	margin: 10px;
}

form#WebToLeadForm h1 {
	font-size: 32px;
	font-weight: bold;
	background-color: rgb(60, 141, 188);
	color: rgb(247, 247, 247);
	padding: 10px 20px;
}

form#WebToLeadForm h2 {
	font-size: 24px;
	font-weight: bold;
	background-color: rgb(60, 141, 188);
	color: rgb(247, 247, 247);
	padding: 10px 20px;
}

form#WebToLeadForm h3 {
	font-size: 12px;
	font-weight: bold;
	padding: 10px 20px;
}

form#WebToLeadForm h4 {
	font-size: 10px;
	font-weight: bold;
	padding: 10px 20px;
}

form#WebToLeadForm h5 {
	font-size: 8px;
	font-weight: bold;
	padding: 10px 20px;
}

form#WebToLeadForm h6 {
	font-size: 6px;
	font-weight: bold;
	padding: 10px 20px;
}

form#WebToLeadForm p {
	padding: 10px 20px;
}

form#WebToLeadForm input, form#WebToLeadForm select, form#WebToLeadForm textarea
	{
	border: 1px solid #ccc;
	display: block;
	float: left;
	min-width: 170px;
	padding: 5px;
}

form#WebToLeadForm select {
	background-color: white;
}

form#WebToLeadForm input[type="button"], form#WebToLeadForm input[type="submit"]
	{
	display: inline;
	float: none;
	padding: 5px 10px;
	width: auto;
	min-width: auto;
}

form#WebToLeadForm input[type="checkbox"], form#WebToLeadForm input[type="radio"]
	{
	width: 18px;
	min-width: auto;
}

form#WebToLeadForm div.col {
	display: block;
	float: left;
	width: 330px;
	padding: 10px 20px;
}

form#WebToLeadForm div.clear {
	display: block;
	float: none;
	clear: both;
	height: 0px;
	overflow: hidden;
}

form#WebToLeadForm div.center {
	text-align: center;
}

form#WebToLeadForm div.buttons {
	padding: 10px 0;
	border-top: 1px solid #ccc;
	background-color: #f7f7f7
}

form#WebToLeadForm label {
	display: block;
	float: left;
	width: 160px;
	font-weight: bold;
}

form#WebToLeadForm span.required {
	color: #FF0000;
}
-->
</style>
	<!-- TODO ???
<script type="text/javascript" src='https://www.example.com/SuiteCRM/cache/include/javascript/sugar_grp1.js?v=EE9vkE9069xvxUcDYPVnqg'></script>
-->
	<form id="WebToLeadForm"
		action="https://www.example.com/SuiteCRM/index.php?entryPoint=WebToPersonCapture"
		method="POST" name="WebToLeadForm">
		<h2>Web form to create Leads</h2>
		<p>Submitting this form will create Leads</p>
		<div class="row">
			<div class="col">
				<label>Account Name: </label><input name="account_name"
					id="account_name" type="text" />
			</div>
			<div class="col">�</div>
			<div class="clear">�</div>
		</div>
		<div class="row">
			<div class="col">
				<label>Salutation: </label><select name="salutation" id="salutation"
					tabindex="1">
					<option value="" selected="selected">--None--</option>
					<option value="Mr.">Mr.</option>
					<option value="Ms.">Ms.</option>
					<option value="Mrs.">Mrs.</option>
					<option value="Dr.">Dr.</option>
					<option value="Prof.">Prof.</option>
				</select>
			</div>
			<div class="col">�</div>
			<div class="clear">�</div>
		</div>
		<div class="row">
			<div class="col">
				<label>First Name: </label><input name="first_name" id="first_name"
					type="text" />
			</div>
			<div class="col">�</div>
			<div class="clear">�</div>
		</div>
		<div class="row">
			<div class="col">
				<label>Last Name: <span class="required">*</span></label><input
					name="last_name" id="last_name" type="text" required="" />
			</div>
			<div class="col">�</div>
			<div class="clear">�</div>
		</div>
		<div class="row">
			<div class="col">
				<label>Email Address: </label><input name="email1" id="email1"
					type="email" />
			</div>
			<div class="col">�</div>
			<div class="clear">�</div>
		</div>
		<div class="row">
			<div class="col">
				<label>Title: </label><input name="title" id="title" type="text" />
			</div>
			<div class="col">�</div>
			<div class="clear">�</div>
		</div>
		<div class="row">
			<div class="col">
				<label>Office Phone: </label><input name="phone_work"
					id="phone_work" type="text" />
			</div>
			<div class="col">�</div>
			<div class="clear">�</div>
		</div>
		<div class="row center buttons">
			<input class="button" name="Submit" type="submit" value="Submit"
				onclick="submit_form();" />
			<div class="clear">�</div>
		</div>
		<input name="campaign_id" id="campaign_id" type="hidden"
			value="abd2217e-4884-c15c-6ddf-583d59679ed6" /> <input
			name="redirect_url" id="redirect_url" type="hidden"
			value="http://wwwexample.com/ibm-i-products/ibm-i-change-management" />
		    <input name="assigned_user_id" id="assigned_user_id" type="hidden"
			value="1" /> 
			<input name="moduleDir" id="moduleDir" type="hidden" value="Leads" />
	</form>
	<p>
		<script type="text/javascript">
			// <![CDATA[
			function submit_form() {
				if (typeof (validateCaptchaAndSubmit) != 'undefined') {
					validateCaptchaAndSubmit();
				} else {
					check_webtolead_fields();
					//document.WebToLeadForm.submit();
				}
			}

			function check_webtolead_fields() {
				if (document.getElementById('bool_id') != null) {
					var reqs = document.getElementById('bool_id').value;
					bools = reqs.substring(0, reqs.lastIndexOf(';'));
					var bool_fields = new Array();
					var bool_fields = bools.split(';');
					nbr_fields = bool_fields.length;
					for (var i = 0; i < nbr_fields; i++) {
						if (document.getElementById(bool_fields[i]).value == 'on') {
							document.getElementById(bool_fields[i]).value = 1;
						} else {
							document.getElementById(bool_fields[i]).value = 0;
						}
					}
				}
			}
			// ]]>
		</script>
	</p>
</body>
</html>

Also I tweaked some of the output so as not to load up my server details… :wink:

Yes, got it,

Below this line :

<form id="WebToLeadForm" action="https://www.example.com/SuiteCRM/index.php?entryPoint=WebToPersonCapture"
		method="POST" name="WebToLeadForm">

Add this line :

<input name="moduleDir" id="moduleDir" type="hidden" value="Leads" />

it should start functioning

At the moment - if you look at the last line in the form - you will see it is already there…

Are you saying move it to the top !!

OK - it does work - for some reason I suppose because I have a cert on my site - it included :443 at the end of the address…

I removed that and it does now work…I’ve just got to translate that to my joomla site and chronoforms now !!

Thanks

Oh, I missed that. I just created a simple form with two field and it works fine.

Try with two field and if it doesn’t work, may be need to track in file system.

If you have knowledge of some coding. die the request at file at modules/Campaigns/WebToPersonCapture.php

Hope this helps you!

Cheers!

My reply missed few seconds!