Skip to Content


Easily collect form data for the CRM by adding a classes to input fields.

JavaScript February 7, 2021




(Required) (String) The name of the column to add the input value to
Default: None

Parameter Notes

This function looks for form [class*="crm-"] which is any input field in a form with a class that begins with “crm-“. The string after the “crm-” in the class name will be used as the column name in the crm() send, the value of the input field will be used as the cell data.

Request or provide clarification »


<input class="crm-first_name" type="text" placeholder="Enter your first name..." />

Additional Notes

This function is automatically triggered on wpcf7:submit so all forms using Contact Form 7.

Source File

Located in /assets/js/modules/analytics.js on line 1348.

No Hooks

This function does not have any filters or actions available. Request one?
nebula.crmForm = async function(formID){
    let crmFormObj = {};

    if ( formID ){
        crmFormObj['form_contacted'] = 'CF7 (' + formID + ') Submit Attempt'; //This is triggered on submission attempt, so it may capture abandoned forms due to validation errors.

    jQuery('form [class*="crm-"]').each(function(){
        if ( jQuery(this).val().trim().length ){
            if ( jQuery(this).attr('class').includes('crm-notable_poi') ){
                ga('set',, jQuery('.notable-poi').val());

            let cat = /crm-([a-z\_]+)/g.exec(jQuery(this).attr('class'));
            if ( cat ){
                let thisCat = cat[1];
                crmFormObj[thisCat] = jQuery(this).val();

    if ( Object.keys(crmFormObj).length ){
        nebula.crm('identify', crmFormObj);


To override or disable this JavaScript function, simply redeclare it with the exact same function name.

nebula.crmForm = function(column_name){
    //Write your own code here, leave it blank, or return false.