Support » Plugin: Contact Form 7: Zoho Leads integration » Submit does nothing. Js error maybe?

  • I use and love this plugin on an old site: WordPress 4.6.3 running AgentPress theme and the 0.0.3 version of this plugin.

    I now want to use it on a new site: WordPress 4.7.2 running Twenty Seventeen Child theme with the latest version of the plugin, 0.0.4.

    Old site still chugging along fine. On the new site however, when the user clicks “Submit” a couple of ajax arrows begin to spin and the submission never occurs. The page also never redirects to the next page. Deactivating the plugin & replacing the shortcode with the regular CF7 shortcode returns the form to normal submitting.

    I’d appreciate a bit of help or guidance on what to look for.
    I haven’t seen anything helpful in the Chrome DevTools. What changed?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author jcornutt

    (@jcornutt)

    Hmm, I’m about to release another version today (having tested with latest WP). I’m not sure why you would get a JS error considering there’s very little JS work being done.

    Please try 0.0.5+ soon and let me know the results. If it doesn’t work, I’d ask that you enable debug logging (WP_DEBUG, WP_DEBUG_LOG set to true in wp-config) and provide logs.

    Yes same thing for me… I saw that you updated the plugin so I though I would give it another shot. And I get the same result a endless spinning arrow below the submit button after pressing it. It says inserting leads into ZoHo, but I checked there and nothing was posted. Here is the Error Log:

    —————
    [08-Mar-2017 16:27:10 UTC] Building CF7 form HTML
    [08-Mar-2017 16:27:47 UTC] Entered function: /home/domain2/public_html/wp-content/plugins/cf7-zoho-leads/cf7-zoho-leads.php:cf7zl_cf7_email_hook()
    [08-Mar-2017 16:27:47 UTC] Inserting record in Zoho Leads
    [08-Mar-2017 16:27:47 UTC] Zoho API request: Array
    (
    [Company] =>
    [First Name] =>
    [Last Name] =>
    [Email] =>
    [Phone] =>
    [Title] =>
    )
    ————–

    Thank You

    Paul

    Plugin Author jcornutt

    (@jcornutt)

    @bocashark can you please tell me the names (or just post the form) of your CF7 form fields? Also, was there values or did you submit the form empty?

    Yes I did fill in every field…
    And I was only trying to get name email phone to transfer over to Zoho.

    Thanks…

    <div class=”feature boxed bg-secondary”>
    <div class=”form-email form-planner”>
    <p>Full Name (required)<br />
    [text* full-name] </p>

    <p>Email (required)<br />
    [email* your-email] </p>

    <p>Phone Number (required)<br />
    [tel* tel-921] </p>

    <p>Company Name (required)<br />
    [text* your-company] </p>

    <p>Company Street Address (required)<br />
    [text* your-address] </p>

    <p>Company City (required)<br />
    [text* your-city] </p>

    <p>Company State (required)<br />
    [text* your-state] </p>

    <p>Company Zip (required)<br />
    [text* your-zip] </p>
    <hr>
    <p>[submit “Send”]</p>
    </div></div>

    Mine is working now. I did quite a few things to get it up and running, but the suggestion to turn on WP_DEBUG and WP_DEBUG_LOG was especially helpful. Here’s what I did:

    Using WP_DEBUG and WP_DEBUG_LOG set to true, I saw in my debug.log file that the call to Zoho to insert the record was failing.
    ‘`[07-Mar-2017 20:23:51 UTC] Building CF7 form HTML
    [07-Mar-2017 20:23:55 UTC] Entered function: /home/micki/shop.youneedtix.com/wp-content/plugins/cf7-zoho-leads/cf7-zoho-leads.php:cf7zl_cf7_email_hook()
    [07-Mar-2017 20:23:55 UTC] PHP Notice: Undefined offset: 1 in /home/micki/shop.youneedtix.com/wp-content/plugins/cf7-zoho-leads/cf7-zoho-leads.php on line 71
    [07-Mar-2017 20:23:55 UTC] PHP Notice: Undefined index: company in /home/micki/shop.youneedtix.com/wp-content/plugins/cf7-zoho-leads/cf7-zoho-leads.php on line 78
    [07-Mar-2017 20:23:55 UTC] PHP Notice: Undefined index: first-name in /home/micki/shop.youneedtix.com/wp-content/plugins/cf7-zoho-leads/cf7-zoho-leads.php on line 78
    [07-Mar-2017 20:23:55 UTC] PHP Notice: Undefined index: last-name in /home/micki/shop.youneedtix.com/wp-content/plugins/cf7-zoho-leads/cf7-zoho-leads.php on line 78
    [07-Mar-2017 20:23:55 UTC] PHP Notice: Undefined index: email in /home/micki/shop.youneedtix.com/wp-content/plugins/cf7-zoho-leads/cf7-zoho-leads.php on line 78
    [07-Mar-2017 20:23:55 UTC] PHP Notice: Undefined index: phone in /home/micki/shop.youneedtix.com/wp-content/plugins/cf7-zoho-leads/cf7-zoho-leads.php on line 78
    [07-Mar-2017 20:23:55 UTC] PHP Notice: Undefined index: title in /home/micki/shop.youneedtix.com/wp-content/plugins/cf7-zoho-leads/cf7-zoho-leads.php on line 78
    [07-Mar-2017 20:23:55 UTC] Inserting record in Zoho Leads
    [07-Mar-2017 20:23:55 UTC] Zoho API request: Array
    (
    [Company] =>
    [First Name] =>
    [Last Name] =>
    [Email] =>
    [Phone] =>
    [Title] =>
    [Lead Source] => troubleshooting
    )

    [07-Mar-2017 20:23:56 UTC] PHP Fatal error: Uncaught exception ‘ZohoException’ with message ‘Unable to process your request. Please verify if the name and value is appropriate for the “authtoken” parameter.’ in /home/micki/shop.youneedtix.com/wp-content/plugins/cf7-zoho-leads/libs/zoho-crm-api.php:193`

    Right off the bat I saw that I’d been using the wrong “AuthToken”. D’oh! I should’ve just clicked the link in the plug-in settings but instead I’d used the one from Zoho. Big mistake. Once corrected, I stopped getting the AuthToken error but still could not insert a record.

    In my current form, I only really want to capture the email address and phone number, but there are other fields required to send the form’s information to Zoho. For my purpose I don’t need fields like Company or even First Name. So I installed an additional plugin called Contact Form 7 Dynamic Text Fields or something like that, set default values for the hidden form fields and that was that!

    Once I got the fields in correctly, I noticed that although I am now getting an email from Contact Form 7 successfully, but unfortunately I had the dreaded spinning arrows issue. To combat that I set define( 'WPCF7_LOAD_JS', false); and life was good!

    No more issues. Data is flowing into Zoho correctly now. Thanks!

    • This reply was modified 5 years, 9 months ago by mizzkalanit.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Submit does nothing. Js error maybe?’ is closed to new replies.