MrMason Posted April 5, 2011 Share Posted April 5, 2011 (edited) 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 April 5, 2011 by MrMason 0 Quote Link to comment Share on other sites More sharing options...
bobbravo2 Posted May 29, 2011 Share Posted May 29, 2011 I forked it and made a simple DRY modification, kept the nameserver regex as a global and removed the repetition for readability: https://gist.github.com/997659 0 Quote Link to comment Share on other sites More sharing options...
Brainchild Labs Pty Ltd Posted November 5, 2011 Share Posted November 5, 2011 Is this feature inbuilt yet in the latest version of WHMCS ? If not what are the actual instructions to get this working.. Thanks. 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.