Jump to content

Checkboxes Not Working - Domain Checker


Recommended Posts

Hello everyone,

I am new here and in desperate need of some help :)

I am trying to build a new website and on it, I would like checkboxes for the domain checker instead of a drop down.

I have built the code but for some reason it keeps defaulting to .co.uk or .on (???) after clicking submit. Does anyone know why this is?

 

Here is part of it:

 <form action="https://mydomain.co.uk/domainchecker.php" method="post" class="checkdomain form-inline">
							<input type="hidden" name="direct" value="true" />
                                                               <div class="checkdomain-wrapper">
                                                                   <p>If you order a hosting plan you may be able to qualify for a free for life domain name, where we will manage it for you and make any changes.</p>
                                                                   <div class="form-group">
                                                                       <label class="sr-only" for="domainnamehere-menu">Domain name</label>
                                                                       <input type="text" name="domain" class="form-control" id="domainnamehere-menu" placeholder="Enter domain name here..">
                                                                       <button type="submit" class="btn btn-default"><i class="fa fa-search"></i> Search</button>
                                                                   </div>
                                                                   <hr>
                                                                   <div class="clearfix"></div>
                                                                   <div class="checkbox checkbox-warning">
                                                                      <input id="domaincom-menu" type="checkbox" class="styled" checked>
                                                                       <label for="domaincom-menu"> <option name="tlds[]" value=".com">.com</option></label>
                                                                   </div>

 

I have played around with the settings for name= and value= but nothing seems to have worked.

I am only working on the .com at the moment and then will roll it out to the rest when it actually works. Any advice would be fab.

 

Thank you

Aaron

 

- - - Updated - - -

 

Forgot to add, that this item will not be in the same directory as my whmcs install.

Link to comment
Share on other sites

Aaron,

 

I have built the code but for some reason it keeps defaulting to .co.uk or .on (???) after clicking submit. Does anyone know why this is?

is .co.uk the first in your TLD domain pricing list ? not sure why .on appears though! :?:

 

I have played around with the settings for name= and value= but nothing seems to have worked.

I am only working on the .com at the moment and then will roll it out to the rest when it actually works. Any advice would be fab.

 

Forgot to add, that this item will not be in the same directory as my whmcs install.

that last sentence is important!

 

in that case, what I would do is use the Domain Checker Data Feed...

 

http://docs.whmcs.com/Data_Feeds#Domain_Checker_Form

 

the advantage of using a feed is that will have direct access to your list of TLDs, so the feed should be able to generate the checkbox list for you in a foreach loop.

 

do it in three stages...

 

1. use it as is.

2. when you can see it working, then change the dropdown code to use checkboxes.

3. then style it to your site.

 

two other things that may help... the code in the thread below would work if this was internal to WHMCS, but you wouldn't necessarily be able to use the code external as the variables and arrays would be missing...

 

http://forum.whmcs.com/showthread.php?113438-How-we-can-add-a-domain-search-checkbox-in-six&p=460163#post460163

 

also, it might be an option, instead of using domainchecker, to use the cart (register domain) instead - using the link integration code, I think that would quite happily accept a checkbox option when searching.

Link to comment
Share on other sites

Thanks again Brian,

I checked out the coding for the cart (view source) and changed each domain extension to this:

<div class="checkbox checkbox-warning">
<input id="domaincom-menu" name="tld" value=".co.uk" type="checkbox" class="styled" checked>
<label for="domaincom-menu">.co.uk</label>
</div>

It will now recognise the different TLD. provided that only one is selected.

 

Thats the next mission, but I am sure it will be somewhere in the bulk register section :)

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