Jump to content

Domain checker integration code no longer works


Recommended Posts

Hello,

The integration code under utilities has the domain search HTML used for performing domain searches from outside of WHMCS.

This will not work if Google invisible re-capcha is enabled for domain searches.

<form action="/cart.php?a=add&domain=register" method="post">
Find your Domain: <input type="text" name="query" size="20" />
<input type="submit" value="Go" />
</form>

Since this code and comparing with the homepage domain search on the Six template a lot has changed. The six template uses domain for the text input name instead of query. The action URL uses domainchecker.php, has a hidden field and the search button has 2 classes which appear to be to pass the captcha (btn-recaptcha & btn-recaptcha-invisible).

I have made some updates as per the Six template but it is very buggy when using from a page outside of WHMCS:

<form action="/domainchecker.php" method="post" id="frmDomainHomepage">
	<input type="hidden" name="transfer" />
	<input type="text" name="domain" autocapitalize="none" placeholder="Search for your perfect domain name!" />
	<input type="submit" class="btn btn-recaptcha btn-recaptcha-invisible" value="Search" />
</form>

For example it will show the no characters entered during the search but will end with the domain available message.

Thanks.

Link to comment
Share on other sites

  • WHMCS Support Manager

Hi @zomex,

I can confirm that the integration codes won't be able to submit form data to forms with captcha protection turned on.  This is part of the captcha design and  has been the case since the basic 5-char captcha was added many years ago.

You'd need to disable captcha on those forms in order to use the integration codes to submit data from an external form.

 

Link to comment
Share on other sites

4 hours ago, WHMCS John said:

Hi @zomex,

I can confirm that the integration codes won't be able to submit form data to forms with captcha protection turned on.  This is part of the captcha design and  has been the case since the basic 5-char captcha was added many years ago.

You'd need to disable captcha on those forms in order to use the integration codes to submit data from an external form. 

  

Thanks for the reply.

Over the years I have updated my form with changes made to the one on the Six homepage. It is not perfect but at least it doesn't result in an error when the captcha is enabled. Would be worth replacing the example in utilities > integration code with the following rather than keeping one that will result in a error for anyone using a Capcha:

<form action="/domainchecker.php" method="post" id="frmDomainHomepage">
    <input type="hidden" name="transfer" />
    Find your Domain: <input type="text" name="domain" autocapitalize="none" placeholder="Search for your perfect domain name!" size="20" />
    <input type="submit" class="btn btn-recaptcha btn-recaptcha-invisible" value="Search" />
</form>

 

Link to comment
Share on other sites

  • 4 months later...
  • 1 year later...
  • 6 months later...
  • 1 year later...

I am redeveloping my website and am having this issue.

But it does not occur on the old/existing site, which means it obviously is possible to get this working with captcha enabled, but I just don't know how, as I have not done anything special on the old site.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated