Developer Portal

WebFormJS

NucleusCRM's WebFormJS is the easiest way to integrate NucleusCRM with your existing forms, you can start capturing leads within minutes.

Getting Started
Include the WebFormJS JavaScript Library in your web page from either our Content Delivery Network or a location on your server. WebFormJS can be used on any existing form without altering or affecting it. WebFormJS sends the data in the background while regular form submission functionality is maintained.

Integration
To Include WebFormJS directly through NucleusCRM's CDN:
<script type='text/javascript' src='https://cdn.nucleuscrm.net/webformjs/webformjs-bundle.min.js'></script>

or if you prefer to host WebFormJS locally, download the latest bundle here:
WebFormJS-Latest-Bundle.zip - v0.1.33 - ZIP - 1.1KB
MD5: 9ed532ce6681b5c5dee66dff177fadb7
SHA1: 155dd518b74f6bd1b98b0d2f31a5f70131e79413



Initialize WebFormJS
With the code below, WebFormJS attaches itself to the form's OnSubmit event, which allows it to capture the form data before it is posted.
Place this code below the form and replace the two variables with your form id and WebForms Access Key.
<script>webformjs_init('<!form_id!>','<!webform_key!>');</script>

You can view or create WebForm Access Keys in , this requires an account with Administrator permissions.


WebForm Classes
To identify the input fields that you want to capture with WebFormJS, add the corresponding WebForm Class Name. When a WebForm Class is added to multiple inputs it will append each field in order of its appearance in the form.

Example:
<input type='text' id='name' class='input-name webform-name' placeholder='John Doe'>
<input type='text' id='email' class='input-email webform-emailwork' placeholder='user@domain.com'>

WebFormJS Class Name
Value
Max Characters
webform-name
company or customer name
64
webform-description
any free text
256
webform-emailwork
work e-mail adddress
128
webform-emailprivate
private e-mail adddress
128
webform-phonemobile
mobile phone number
24
webform-phonework
work phone number
24
webform-phoneprivate
private phone number
24
webform-fax
fax number
24
webform-officeaddress
office address
128
webform-whatsapp
whatsapp phone number
24
webform-web
web url
128
webform-facebook
facebook user name
64
webform-twitter
twitter handle
64



WebFormJS - Integration In Existing Form
Make sure your existing form has an id set.
<form method='post' id='contactform'>

To initialize WebFormJS include the following code below your form, using your form id and WebForm Access Key :
<script>webformjs_init('contactform','<!webform_key!>');</script>


WebFormJS - Example Integration In Existing Form
<script type='text/javascript' src="https://cdn.nucleuscrm.net/webformjs/webformjs-bundle.min.js"></script>

<form method='post' action='/contact.php' id='contactform'>
<input type='text' id='name' class='input-name webform-name' placeholder='John Doe'>
<input type='text' id='email' class='input-email webform-emailwork' placeholder='user@domain.com'>
<textarea id='comment' class='input-comment webform-description'></textarea>
<button id='submitbutton' class='input-button'>Send</button>
</form>

<script>webformjs_init('contactform','<!webform_key!>');</script>

Make sure to replace the '<!webform_key!>' tag with your own WebForm Access Key.
You can view or create WebForm Access Keys in , this requires an account with Administrator permissions.
We use cookies for site operation and analytics to improve user experience. You can read more about cookie usage in our Privacy Policy.