Jump to content

Help with custom domain search form


Mike4286

Recommended Posts

Hello,

 

I have a custom domain search form on my website, although when entering a domain and click go, it goes to the WHMCS Register a Domain page, and customer has to enter the information again into the form and click search again.

 

I have tried everything and cannot seem to make it carry the domain straight to the domain search process within WHMCS.

 

Could someone help?

 

This is my current form:

 

 

 

 

 

 

<form method="post" id="domain-searchform" action="https://www.mydomain.com/host/cart.php?a=add&domain=register">

<div>

<input class="input-text" name="s" id="s" value="Enter your Domain Name here..." onFocus="if (this.value == 'Enter your Domain Name here...') {this.value = '';}" onBlur="if (this.value == '') {this.value = 'Enter your Domain Name here...';}" type="text" />

 

<select class="switch">

<option value=".com">.com</option>

<option value=".net">.net</option>

<option value=".info">.info</option>

<option value=".org">.org</option>

<option value=".ca">.ca</option>

<option value=".us">.us</option>

<option value=".co.uk">.co.uk</option>

<option value=".biz">.biz</option>

<option value=".mobi">.mobi</option>

<option value=".tips">.tips</option>

<option value=".guru">.guru</option>

</select>

 

<input id="searchsubmit" value="Search" type="submit" />

 

</div>

</form>

Link to comment
Share on other sites

Mike,

 

it's your form variable names - the cart will be expecting sld (google) and tld (.com)... give it that, and assuming you aren't using captcha, you're good to go. :idea:

 

<form method="post" id="domain-searchform" action="cart.php?a=add&domain=register">
<div>
<input class="input-text" name="sld" id="sld" placeholder="Enter your Domain Name here..." type="text" />

<select name="tld">
<option value=".com">.com</option>
<option value=".net">.net</option>
<option value=".info">.info</option>
<option value=".org">.org</option>
<option value=".ca">.ca</option>
<option value=".us">.us</option>
<option value=".co.uk">.co.uk</option>
<option value=".biz">.biz</option>
<option value=".mobi">.mobi</option>
<option value=".tips">.tips</option>
<option value=".guru">.guru</option>
</select>

<input id="searchsubmit" value="Search" type="submit" />

</div>
</form>

that said, i'd be tempted to do it as a Data Feed as then that could auto-generate your list of TLDs from your pricing - e.g., the old domainchecker data feed would still work with v7.

Link to comment
Share on other sites

  • 3 years later...

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