Jump to content

Error Checking Nameservers


Recommended Posts

We are currently in the process of moving over to WHMCS.

 

I was quite surprised at the lack of error checking on user signup, especially when asking for domain details (.uk is the worst!)

 

I've been writing some Javascript to try and combat people simply typing their name in 4 times to the nameservers field, as this happens a lot!.

 

I was wondering if anyone else had already done something similar?

 

I currently have it so that NS1 and NS2 are required and valid, and that NS3 and NS4 are valid. I need to make it so that you can't have NS4 without NS3, but that's not all that important. It checks nameservers one by one, rather than all at the same time, so errors are only found one by one, and then it will alert the user of the next error.

 

You need to edit templates/orderforms/web20cart/configuredomains.tpl

 

and add the id "configure_domains_form" to the form:

 

from

 

<form method="post" action="{$smarty.server.PHP_SELF}?a=confdomains">

 

to

 

<form id="configure_domains_form" method="post" action="{$smarty.server.PHP_SELF}?a=confdomains">

 

Here is the gist :

 

https://gist.github.com/902746

 

I have this added in my footer file as a.js file, right before the </body> tag.

 

Also you'll need a css class "errorbox" which highlights the broken Nameserver.

Edited by MrMason
Link to comment
Share on other sites

  • 1 month later...
  • 5 months 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