Jump to content

www. in search


Recommended Posts

Hello,

Can someone help me with a problem with the domainname look up, when someone fill in www. in the field domainname search field. (www.example-domain.nl)

Then the domeinnaam is gone, only "www.nl" remains into the search results.  

Can someone tell me where, or how I need to change te script so that the www. is by default, filtered out there?

Thank you so much!

Greetings Roel

Schermafbeelding 2017-12-13 om 14.28.59.png

Link to comment
Share on other sites

Hi Roel,

On 12/13/2017 at 13:32, Roel van Distel said:

Can someone help me with a problem with the domainname look up, when someone fill in www. in the field domainname search field. (www.example-domain.nl)

Then the domeinnaam is gone, only "www.nl" remains into the search results.

this looks like a bug within v7.4 to me as it isn't stripping the 'www' out automatically before beginning the search (even using default Six)... in v6, it did. aaah.gif

your situation is a little complicated because you're using a custom template, but one option might be to tweak your main website form from...

<input class="form-control-1" name="domain" placeholder="Claim jouw domeinnaam..." autocapitalize="none" type="text">

to

<input class="form-control-1" name="query" placeholder="Claim jouw domeinnaam..." autocapitalize="none" type="text" pattern="^www.$">

that should show an error if someone tries to enter "www." in the search field...

B8X5ZkW.png

or if you need a custom message...

<input class="form-control-1" name="query" placeholder="Claim jouw domeinnaam..." autocapitalize="none" type="text" pattern="^www.$" oninvalid="this.setCustomValidity('Do not enter www.')" oninput="setCustomValidity('')">

4UcxfET.png

... which you could easily translate to Dutch better than me! celestial5.gif

Link to comment
Share on other sites

5 hours ago, Roel van Distel said:

Thank you for your option. The pattern="^www.$" is unfortunately not working. When placing this code, no input, with or without the www.,  is accepted any more.

try this...

<input class="form-control" name="domain" placeholder="Typ hier je gewenste domeinnaam..." autocapitalize="none" pattern="^((?!www.).)*$" oninvalid="this.setCustomValidity('Do not enter www.')" oninput="setCustomValidity('')" type="text">

PpcqFsJ.png

then if you remove www. from the entered string, it will pass google.com to the cart to search...

AcDJOxF.png

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