As you can see in the screenshot the code is published but fails… I did the above form as a test example just to try it out.
Below is the rendered code that I used in WordPress and generated by SuiteCRM automatically.
<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 ???
-->
<form action='https://crm.domain-example.com/index.php?entryPoint=investorleadcapture' name='WebToLeadForm' method='POST' id='WebToLeadForm'>
<h2>Investor Relations </h2>
<p>Interested to hear about our opportunity?
Fill out the information below and one in the staff will contact you. </p><div class="row"><div class="col"><label>Salutation: </label><select id="salutation" name="salutation" tabindex="1">
<OPTION selected value=''>--None--</OPTION>
<OPTION value='Mr.'>Mr.</OPTION>
<OPTION value='Ms.'>Ms.</OPTION>
<OPTION value='Mrs.'>Mrs.</OPTION>
<OPTION value='Miss'>Miss</OPTION>
<OPTION value='Dr.'>Dr.</OPTION>
<OPTION value='Prof.'>Prof.</OPTION></select></div><div class="col"><label>Mobile: </label><input id="phone_mobile" name="phone_mobile" type="text"></div> <div class="clear"> </div>
</div><div class="row"><div class="col"><label>First Name: </label><input id="first_name" name="first_name" type="text"></div><div class="col"><label>Office Phone: </label><input id="phone_work" name="phone_work" type="text"></div> <div class="clear"> </div>
</div><div class="row"><div class="col"><label>Last Name: <span class='required'>*</span></label><input id="last_name" name="last_name" type="text" required></div><div class="col"><label>Email Address: </label><input id="email1" name="email1" type="email"></div> <div class="clear"> </div>
</div><div class="row"><div class="col"><label>Job Title: </label><input id="title" name="title" type="text"></div><div class="col"><label>Website: </label><input id="website" name="website" type="text"></div> <div class="clear"> </div>
</div>please fill out the form and a Investor Relations Officer (IRO) will contact you for further discussions.
<div class="row center buttons">
<input type="submit" class="button" name="Submit" value="Please Contact Me" />
<div class="clear"> </div>
</div>
<input type='hidden' id='campaign_id' name='campaign_id' value='865bf73d-89fa-29c6-70d3-60b525c18848'>
<input type='hidden' id='redirect_url' name='redirect_url' value='https://domain-example.com/thank-you-ir/'>
<input type='hidden' id='assigned_user_id' name='assigned_user_id' value='9ca72d00-117b-6144-6970-60b4dd667b72'>
<input type='hidden' id='moduleDir' name='moduleDir' value='Leads'></form>
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;
}
}
}
}
</body></html>
I removed the html tags of course when I posted/published it in WordPress…
I would appreciate a lot if someone could be kind help me with this and tell me how to fix this. Is this by the way a bug in SuiteCRM or something?
Thanks in advance.
Kind regards
PowerQuest