Jump to content

How to add a field in checkout page


Recommended Posts

Hi everyone


I am very new to WHMCS and I am trying to learn as much as I can.


I was wondering if it is possible to add another field to the checkout page. I've attached a screen capture of the page, what I need to do is to add a textbox just below the Company Name.







Link to comment
Share on other sites



what you are wanting to use are known as "Custom Fields" in WHMCS - http://docs.whmcs.com/Custom_Fields - in this case, it's going to be a Custom Client Field.


once you've created the field via Setup -> Custom Client Fields and ticked the "Shown On Order Form" checkbox, it should automatically be added below your existing form fields.


if you wanted to move it to between company name and email, then you would need to edit the viewcart.tpl template of your order-form template (looks like Modern to me) and move the code that displays the custom fields from its current location to before the Email form field.


<tr><td class="fieldlabel">{$LANG.clientareaemail}</td>

the code that displays the custom fields is shown below and should already exist in your template file below the code that generates the default form fields.


{foreach key=num item=customfield from=$customfields}
<tr><td class="fieldlabel">{$customfield.name}</td><td class="fieldarea" colspan="3">{$customfield.input} {$customfield.description}</td></tr>

if you're using a different order-form template, then the code might be slightly different.

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.

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