The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Modify WHM "Create a New Account" template

Discussion in 'cPanel Developers' started by pijulius, Jan 4, 2012.

  1. pijulius

    pijulius Member

    Jan 31, 2009
    Likes Received:
    Trophy Points:
    Hi Guys, I'm new to the development under WHM/cPanel, I read some of the documentation that you have and I see there is a lot of possibility to integrate a code to the WHM using API or even write own plugins but I have a different need and maybe you can point me to the right direction.

    What I would like to do is to add a new section to the WHM "Create a New Account" page and I know you can easily clone the default theme and then just edit the docroot/templates/createacct.tmpl and add the code needed but for my small change I think there is a better way.

    I saw in the createacct.tmpl file that there is a line that would do just exactly what I want but can't find any help on google, I'm talking about:

    [% FOREACH custom_field = data.custom_fields;
    INCLUDE "${custom_field.path}" IF custom_field.type == 'tt2';
    END; %]
    and as I see if I could somehow add a new custom_field to the data.custom_fields with a type=tt2 and path='mysection.tmpl' this would work just perfectly

    So my question would be how could I add custom fields to the data variable lets say from API or XML so I don't have to modify the createacct.tmpl file?

    Thanks in advance!
    #1 pijulius, Jan 4, 2012
    Last edited: Jan 4, 2012

Share This Page