Search

Postback

Submit web form through AJAX call.

To see this example in action, check the network tab of browser console to see AJAX request sent.

Thank you!

Something went wrong. Please submit your information via an alternative method.

View code
<form action="wb-postback-en.html" class="wb-postback" data-wb-postback="{&quot;success&quot;:&quot;success-message&quot;,&quot;failure&quot;:&quot;failure-message&quot;}">
	<div class="form-content">
		<div class="form-group">
			<label for="firstname"><span class="field-name">First Name</span></label>
			<input class="form-control" id="firstname" name="firstname" type="text" data-rule-minlength="2" />
		</div>
		<div class="form-group">
			<label for="lastname"><span class="field-name">Last Name</span></label>
			<input class="form-control" id="lastname" name="lastname" type="text" data-rule-minlength="2" />
		</div>
		<div class="form-group">
			<label for="preferredNumber">Preferred: <span class="field-name">Phone Number</span></label>
			<input class="form-control" id="preferredNumber" name="preferredNumber" type="tel" data-rule-phoneUS="true" />
		</div>
		<div class="form-group">
			<label for="email"><span class="field-name">Email Address</span> (test@domaine)</label>
			<input class="form-control" id="email" name="email" type="email" />
		</div>
		<button type="submit" class="btn btn-primary">Submit</button>
	</div>
</form>
<p class="success-message hide">Thank you!</p>
<p class="failure-message hide">Something went wrong. Please submit your information via an alternative method.</p>
Report a problem on this page
Please select all that apply:

Thank you for your help!

You will not receive a reply. For enquiries, please contact us.

Date modified: