Adding your fields

From ISPWiki

Jump to: navigation, search

If you need more form fields and or want to store additional information, follow the instructions below to add your fields:

For example, a payer needs a filled "Current account".

1) Create an additional field in the database

alter table profile add column selfrs varchar(20);

Note: only varchar is currently supported.

2) Register the newly created field

insert into extrafield (id, name) select max(id)+1, 'profile.selfrs' from extrafield;

3) Create the XML that describes the form

<?xml version="1.0" encoding="UTF-8"?>

<mgrdata>
       <metadata name="profile.edit">
               <form>
                       <page name="basic">
                               <field name="selfrs" level="7">
                                       <input type="text" name="selfrs"/>
                               </field>
                       </page>
               </form>
       </metadata>
       <lang name="en">
               <messages name="profile.edit">
                       <msg name="selfrs">Personal R/S</msg>
               </messages>
       </lang>
       <lang name="ru">
               <messages name="profile.edit">
                       <msg name="selfrs">Personal Р/С</msg>
               </messages>
       </lang>
</mgrdata>

Locate the above described code into /usr/local/ispmgr/etc/billmgr_mod_selfrs.xml

The file should meet the XML (ISPmanager) scheme requirements.

You can locate the examples in /usr/local/ispmgr/etc/billmgr.xml. Do not try to modify them, because they will be lost after update.

4) Restart BILLmanager

killall billmgr


If the XML file is not be displayed in the interface, try to clean cache.

rm -rf /usr/local/ispmgr/var/.xmlcache/billmgr
killall billmgr
Was this helpful? Yes | No
Personal tools