HTML Form Code Example


Below is an example form that includes the placeholder id="consentText"", id="consentTextIPAddress", as well as the code snippet.

<html>
<head>
	<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" />
	<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
	<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
</head>
<body>
<form id="smallform">
	<!-- consentTextIPAddress id for field where the IP address of the user will be stored -->
	<input type="hidden" name="IPAddress" id="consentTextIPAddress" />
	<fieldset>
	    <span class="field">
		<input type="text" name="FirstName" id="FirstName" placeholder="First Name" />
	    </span>
	    <span class="field">
		<input type="text" name="LastName" id="LastName" placeholder="Last Name" />
	    </span>
	    <span class="field">
		<input type="text" name="Email" id="Email" placeholder="Email" />
	    </span>
	    <span class="field">
		<input type="text" name="Phone" id="Phone" placeholder="Phone Number" />
	    </span>
	    <span class="field">
		<input type="text" name="Zip" id="Zip" placeholder="Zip Code" />
	    </span>
	</fieldset>
    <!-- consentText id for placeholder where consent text will be rendered -->
	<p class="terms" id="consentText">
	    <input type="checkbox" />
	</p>
	<p class="actions">
	<a class="btn-submit" onclick="SubmitForm();">Contact Me</a>
	</p>
</form>

<!-- LeadExec Consent Provider Script Block -->
<script type="text/javascript">
	const consentKey = '[CONSENT_API_KEY]';
	const consentTextAppendMode = 'default';
	const consentTextLoadOnPageLoad = true;
	const consentTextElementName = 'consentText';
	const consentTextIPElementName = 'consentTextIPAddress';
	(function () {
	    var consentJs = document.createElement('script'); consentJs.type = 'text/javascript'; consentJs.async = true;
	    consentJs.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'consentprovider.leadexec.net/scripts/requestJS.min.js';
	    var consentS = document.getElementsByTagName('script')[0]; consentS.parentNode.insertBefore(consentJs, consentS);
	})();
</script>
</body>
</html>