artaweb Posted February 22, 2021 Share Posted February 22, 2021 (edited) Hello, On our registration page, the input for security question input is in password format. When our users are registering, their keyboard is always switched to another language which is not English friendly. We have this case almost everyday that someone cant get their security question right. Thanks to removing the ability to change security questions by admin, It is further complicated for us as it prolongs the support procedures. I really hope that WHMCS can see reason into questioning the user via feedback before making decisions on how the system works. WHMCS is a vital tool to our business, you can't make decisions on that alone on your own. When you do, provide an alternative as well. Anyways, what I need is to change the input for security question answer from password to text so user can see what they are typing. I know this can be done by modifying clientregister.tpl but this gets replaced every time we update the theme. Thank you Edited February 22, 2021 by artaweb 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 22, 2021 Share Posted February 22, 2021 3 hours ago, artaweb said: Anyways, what I need is to change the input for security question answer from password to text so user can see what they are typing. I know this can be done by modifying clientregister.tpl but this gets replaced every time we update the theme. I think i'd still be inclined to edit the template to avoid any potential JS/browser clashed (though I know what you mean about update issues)... ... but if you just want to change the input type(s) with a hook... <?php # Change Security Answer Field Type To Text Hook # Written by brian! add_hook('ClientAreaHeaderOutput', 1, function ($vars) { if (in_array($vars['templatefile'],array('clientregister','viewcart'))) { $changeInputType = '<script>$( document ).ready(function() { $("#inputSecurityQAns").prop({type:"text"}); });</script>'; return $changeInputType; } elseif (in_array($vars['templatefile'],array('user-security'))) { $changeInputType = '<script>$( document ).ready(function() { $("#inputSecurityAns1").prop({type:"text"}); $("#inputSecurityAns2").prop({type:"text"}); });</script>'; return $changeInputType; } }); top half changes type in register/checkout pages; bottom half for the two fields in user security. 1 Quote Link to comment Share on other sites More sharing options...
artaweb Posted February 23, 2021 Author Share Posted February 23, 2021 I will go with your recommendation. You are truly a gem to this community. Thank you Brian! 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.