Landing page not generating lead

Hello all,

 

I am trying to create a landing page to generate leads in my Creatio instance. However, despite matching the documentation and copying the code into my html from the landing page record, the page is not generating Creatio leads.

 

<!DOCTYPE html>

<html lang="en-us">

<head>

    <meta charset="UTF-8">

    <title>Keen360 Submit Page</title>
    
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
          integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

</head>

<div class="row">

    <div class="col-lg-12 card">

        <div class="text-right card-header socialMedia">

            <h1 class="text-left text-white">Contact Us</h1>

        </div>

        <!-- Form -->
        <form class="mainForm" name="landingForm" onSubmit="createObject(); return false">
            <label for="fname">Full name:</label><br>
            <input type="text" id="fname" value="John"><br><br>
            <label for="cname">Company:</label><br>
            <input type="text" id="cname" value="AAcom"><br><br>
            <label for="email">Email:</label><br>
            <input type="text" id="email" value="test@email.com"><br><br>
            <label for="phone">Phone number:</label><br>
            <input type="text" id="phone" value="111-111-1111"><br><br>
            <input type="submit" value="Submit">
        </form>

    </div>

</div>

    </div>

<footer class="footer text-center"></footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://webtracking-v01.bpmonline.com/JS/track-cookies.js"></script>
<script src="https://webtracking-v01.bpmonline.com/JS/create-object.js"></script>

<script>
    /**
    * Replace the "css-selector" placeholders in the code below with the element selectors on your landing page.
    * You can use #id or any other CSS selector that will define the input field explicitly.
    * Example: "Email": "#MyEmailField".
    * If you don't have a field from the list below placed on your landing, leave the placeholder or remove the line.
    */
    var config = {
        fields: {
            "Name": "#fname", // Name of a visitor, submitting the page
            "Email": "#email",
            "MobilePhone": "#phone",// Visitor's email
            "Company": "#cname" // Name of a company (for business landing pages)
        },
        landingId: "b95e7199-72e8-421d-8cac-dbd9ae45859f",
        serviceUrl: "https://keen360.creatio.com/0/ServiceModel/GeneratedObjectWebFormServic…",
        redirectUrl: "https://keen360.com/testing/keen360satisfaction.html"
    };
    /**
    * The function below creates a object from the submitted data.
    * Bind this function call to the "onSubmit" event of the form or any other elements events.
    * Example: <form class="mainForm" name="landingForm" onSubmit="createObject(); return false">
    */
    function createObject() {
        landing.createObjectFromLanding(config)
    }
    /**
    * The function below inits landing page using URL parameters.
    */

    function initLanding() {
        landing.initLanding(config)
    }

    function onSubmit() {

        createObject();

        console.log("onSubmit function was called");

        $("#name").empty;

        $("#email").empty;

        $("#number").empty;

        $("#company").empty;

    }
    
    jQuery(document).ready(initLanding)
    
</script>

    </body>

 

File attachments
Like 0

Like

3 comments

It could be that you have required fields on the Lead object (by default "Customer need" is required. If you're not populating any required fields from the landing page, you'll need to add them as default values on the landing page record in Creatio. The Default Values tab will allow you to specify a default value for leads created from the landing page for Customer need, and another other possible required fields.

Ryan

Ryan Farley,

I have set up default values for any fields such as Customer need that are required by Creatio and prompts an error message if not filled in. If there are any that are required for landing pages to work but not required to actually save the Lead page then I may be missing those but I don't know if they exist.

Dear Kevin, Looks like the issue is as below.. as per the referer URL the site URL seems to be sending the below.. so try changing your landing page URL to https://keen360.com* and see if it works.. 

Show all comments