Jump to content

Read-only custom client field


Recommended Posts

I've created a module that tracks some extra data about clients. I want to show this data on the client profile page in the admin area, but it has to be read-only as admins must not make changes. My first thought was to just create a custom template that displays my data as static text, but it looks like customizing the admin templates is not supported (boo - that'll make a lot of things we have planned much harder).

 

My next thought was to create a custom client field and only show it in the admin section. I haven't checked yet, but I assume there is some way for my module to set the value of that field. What I don't see how to do, however, is make it read-only. Is there some way to do this?

 

Thanks.

Link to comment
Share on other sites

Ah, I just found the admin templates. I missed them before, and when I found a post here telling someone else that similar modifications to the admin pages are not possible, I assumed it still held true.

 

It looks like I can do just what I need. Wonderful!

 

For anyone else looking for this functionality, here's a link to the relevant section of the docs:

 

http://docs.whmcs.com/Admin_Area_Template_Files

 

Unlike the docs page about the client-area templates, this one isn't listed in the contents, making it trickier to find. But it is there, linked off the Developer Resources page.

Edited by thesba_rewilliams
Add link to docs
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