nathanb Posted July 22, 2019 Share Posted July 22, 2019 Hi all, I have been looking online on how to remove "root password" and the nameserver sections from the server order form. I changed the class to hidden but that just leaves a bunch of whitespace which isn't the best looking. I have attached an image. All I need is "Hostname" that will add the hostname to the order. Everything else is done via configurable options. Any help is greatly appreciated 🙂 Thanks, Nathan 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 23, 2019 Share Posted July 23, 2019 Hi Nathan, 20 hours ago, nathphotographs said: I have been looking online on how to remove "root password" and the nameserver sections from the server order form. I changed the class to hidden but that just leaves a bunch of whitespace which isn't the best looking. if using CSS isn't an option, usually because WHMCS haven't added unique IDs or names to elements, then the next option is to edit the template... from your screenshot, that should be /templates/orderforms/standard_cart/configureproduct.tpl and specifically the block of code below.... {if $productinfo.type eq "server"} <div class="sub-heading"> <span>{$LANG.cartconfigserver}</span> </div> <div class="field-container"> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label for="inputHostname">{$LANG.serverhostname}</label> <input type="text" name="hostname" class="form-control" id="inputHostname" value="{$server.hostname}" placeholder="servername.yourdomain.com"> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label for="inputRootpw">{$LANG.serverrootpw}</label> <input type="password" name="rootpw" class="form-control" id="inputRootpw" value="{$server.rootpw}"> </div> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label for="inputNs1prefix">{$LANG.serverns1prefix}</label> <input type="text" name="ns1prefix" class="form-control" id="inputNs1prefix" value="{$server.ns1prefix}" placeholder="ns1"> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label for="inputNs2prefix">{$LANG.serverns2prefix}</label> <input type="text" name="ns2prefix" class="form-control" id="inputNs2prefix" value="{$server.ns2prefix}" placeholder="ns2"> </div> </div> </div> </div> {/if} so assuming those 3 fields aren't required, removing their 3 div blocks should give a cleaner look. 0 Quote Link to comment Share on other sites More sharing options...
nathanb Posted July 23, 2019 Author Share Posted July 23, 2019 Hi, Thanks for the reply. 2 minutes ago, brian! said: so assuming those 3 fields aren't required, removing their 3 div blocks should give a cleaner look. I tried this originally and it messed up the entire page. I tried to remove one of them and it still seemed to "corrupt" the page. Everything doesn't align and is where it wants to be. I'm thinking it could be because its a default WHMCS template so its expecting the sections but not entirely sure. Thanks, Nathan 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 24, 2019 Share Posted July 24, 2019 On 23/07/2019 at 08:04, nathphotographs said: I tried this originally and it messed up the entire page. it shouldn't have - for example, if I remove the 3 divs... {if $productinfo.type eq "server"} <div class="sub-heading"> <span>{$LANG.cartconfigserver}</span> </div> <div class="field-container"> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label for="inputHostname">{$LANG.serverhostname}</label> <input type="text" name="hostname" class="form-control" id="inputHostname" value="{$server.hostname}" placeholder="servername.yourdomain.com"> </div> </div> </div> </div> {/if} I get this... with recent versions, there are additional checks and the fields you removed are effectively required... so I assume if you're not seeing that error when you try to continue the order, you're possibly using an older release of WHMCS.. if you're using v7.7+, the workaround would be to make them hidden input fields with random values in them (as I think has been discussed elsewhere in another thread). 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.