SistemasyServicios Posted September 7, 2020 Share Posted September 7, 2020 Hello, We are no longer offering the ability to use customized Nameservers for our VPS servers and are looking for a solution on how to remove the fields from the order form. The problem is while hiding the options the fields will remain hidden when ordering a dedicated server, also. Any way to achieve this? Thanks in advance for your great help. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst WHMCS Danny Posted July 17, 2021 WHMCS Technical Analyst Share Posted July 17, 2021 This should be possible with a template customization according to our documentation: http://docs.whmcs.com/Order_Form_Templates To only hide a field for certain products then something along the lines of this could be used: {if $productinfo.name eq 'Bronze'}<input type="hidden" name="ns1prefix" size="10" value="NA" /> {else} <input type="text" name="ns1prefix" size="10" value="{$server.ns1prefix}" /> {/if} I hope this is what you are looking for. 0 Quote Link to comment Share on other sites More sharing options...
vanttech Posted July 21, 2021 Share Posted July 21, 2021 While this answer is good for most, it needs to be updated. I had the luck to get a WHMCS CS agent who kindly explained the need to replace value="{$server.ns1prefix}" with value="NA" Please note that not doing so will cause a validation error since the Order Page is expecting the value to be provided to be assigned to that field. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst WHMCS Danny Posted July 22, 2021 WHMCS Technical Analyst Share Posted July 22, 2021 Hello, The above example is using an IF/ELSE statement, so the first line of code checks the product name and to only hide the ns1 field for the bronze product and you are correct. You would use what you have provided for the value and that is "NA". However, if you do not want to do this for every product you would still use the original value code of "{$server.ns1prefix}" in the ELSE part of the statement or it will not bring over the ns1 value. It would just bring over "NA" each time. So, you are correct if you want to do this for every product, you need to have a value of "NA" in there for validation purposes and you would want to do it for every product you would remove the IF/ELSE statement and just use this: <input type="text" name="ns1prefix" size="10" value="NA" /> I hope that makes sense. 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.