Osaul Posted April 15, 2016 Share Posted April 15, 2016 Hello, We want to hide some fields in two files: configureproduct.tpl (Hostname, Root Password, NS1 Prefix, NS2 Prefix) and clientregister.tpl (Choose Currency). But if we simply hiding some of this fields, we will receive errors, because billing-system WHMCS requires put in this fields some data. How we can do it correctly? We find {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} Replace with <!-- {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="hidden" name="hostname" class="form-control" id="inputHostname" value="NA"> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label for="inputRootpw">{$LANG.serverrootpw}</label> <input type="hidden" name="rootpw" class="form-control" id="inputRootpw" value="NA"> </div> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label for="inputNs1prefix">{$LANG.serverns1prefix}</label> <input type="hidden" name="ns1prefix" class="form-control" id="inputNs1prefix" value="NA" placeholder="ns1"> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label for="inputNs2prefix">{$LANG.serverns2prefix}</label> <input type="hidden" name="ns2prefix" class="form-control" id="inputNs2prefix" value="NA" placeholder="ns2"> </div> </div> </div> </div> {/if} --> And still get errors (Errors.png). We want know how we can do it correctly, because on forum there so many different opinions. 0 Quote Link to comment Share on other sites More sharing options...
Osaul Posted April 19, 2016 Author Share Posted April 19, 2016 We solved this issue with next: {if $productinfo.type eq "server"} <input type="hidden" name="hostname" class="form-control" id="inputHostname" value="NA"> <input type="hidden" name="rootpw" class="form-control" id="inputRootpw" value="NA"> <input type="hidden" name="ns1prefix" class="form-control" id="inputNs1prefix" value="NA" placeholder="ns1"> <input type="hidden" name="ns2prefix" class="form-control" id="inputNs2prefix" value="NA" placeholder="ns2"> {/if} Without any additional items. 0 Quote Link to comment Share on other sites More sharing options...
Osaul Posted April 23, 2016 Author Share Posted April 23, 2016 Will be better if you specify in this fields some "normal" data, for example: {if $productinfo.type eq "server"} <input type="hidden" name="hostname" class="form-control" id="inputHostname" value="edit.example.com"> <input type="hidden" name="rootpw" class="form-control" id="inputRootpw" value="edit"> <input type="hidden" name="ns1prefix" class="form-control" id="inputNs1prefix" value="ns1.example.com" placeholder="ns1"> <input type="hidden" name="ns2prefix" class="form-control" id="inputNs2prefix" value="NA" placeholder="ns2.example.com"> {/if} 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.