3

I'm developing a WHMCS provisioning module for a client. Its mostly standard stuff but they have a requirement to have some custom fields in the server's config screen.

I know how to add custom fields in the products config screen, but I can't find any details on how to do that in the server's screen...

Anyone done anything like that?

Thanks,

enter image description here

John

John Mc Murray
  • 363
  • 5
  • 17
  • Hi John. please describe what you've tried so far, with actual code. That'll help other see where you really have a problem – Alexandre FILLATRE Dec 15 '16 at 12:34
  • Hi Alexandre.. Thanks for commenting. I haven't tried anything that I can show yet. I have written the new module and that's all working, but I mean in terms of this question all I've been able to do so far is read the developer docs, looked at their example code and searched here for an answer.. I've added a modified screen shot to my question which shows what I'm trying to achieve. – John Mc Murray Dec 15 '16 at 17:02

1 Answers1

2

The server modules were not really designed to do this. I have seen your goal accomplished two ways:

1) You can overload the AccessHash field to store json or some other kind of structured data. This is easiest for the module implementor but is going to be a challenge for users of the module if they are not comfortable with the format you use.

2) You can write an addon module with an interface to allow you to store extra metadata for the server module. This allows you to present an interface to the end user and do much more input validation, however it requires they copy files to two locations and activate two modules to fully use the service.

Unless this is a quick / dirty hack that will only be maintained in a single installation, I would go with the second options.

n8whnp
  • 296
  • 1
  • 5