Jump to content

How to Bypass Nameserver Prefixes on the Order Form


Recommended Posts

Sometimes during the ordering process, you may wish to bypass the nameserver prefix fields which are required by default for VPS/Dedicated product types. 

For instance, you may always want to always use ns1.yourdomain.com and ns2.yourdomain.com instead of having users specify.

This can be accomplished by changing the field type to hidden and specifying a value to be used. The following steps outline how to do this:

  • Create a custom template directory at /templates
  • Copy the /templates/orderforms/standard_cart/configureproduct.tpl file into the custom directory
  • Create a theme.yaml file in the custom directory with the following contents:
config:
    parent: standard_cart
  • Edit the configureproduct.tpl file in your custom template directory and find the following line:
<input type="text" name="ns1prefix" class="form-control" id="inputNs1prefix" value="{$server.ns1prefix}" placeholder="ns1">
  • Replace it with:
<input type="hidden" name="ns1prefix" class="form-control" id="inputNs1prefix" value="ns1.yourdomain.com">

More information regarding how to create a new order form template based on a parent template can be found in the documentation here: https://docs.whmcs.com/Order_Form_Templates#Creating_a_New_Template_based_on_a_Parent

I hope this helps and please feel free to post any further questions/comments.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated