Roel van Distel Posted December 13, 2017 Share Posted December 13, 2017 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 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 14, 2017 Share Posted December 14, 2017 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. 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... 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('')"> ... which you could easily translate to Dutch better than me! 0 Quote Link to comment Share on other sites More sharing options...
Roel van Distel Posted December 15, 2017 Author Share Posted December 15, 2017 Hello Brian, 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. You may have maybe another idea? Thanks for thinking with me! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 15, 2017 Share Posted December 15, 2017 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"> then if you remove www. from the entered string, it will pass google.com to the cart to search... 0 Quote Link to comment Share on other sites More sharing options...
Roel van Distel Posted December 15, 2017 Author Share Posted December 15, 2017 Hello Brian, this is the solution!!! Thank you very much! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.