Adding fields to tables, was: Re: [freeside] signup.cgi errors
ivan
ivan at 420.am
Thu Jun 1 15:18:11 PDT 2000
On Thu, Jun 01, 2000 at 02:29:31PM -0400, Joe Englert wrote:
> Hi Ivan,
> I'm in the process of adding some bonus fields to the cust_main
> table. We need the ability to send bills to someone other than the
> contact person.
>
> After adding fields to the table and some more widgets in the
> edit/cust_main.cgi file, the page will display fields I've manually edited
> but will not write out edits made from the page. After some tracing, it
> looks like the edit/process/cust_main.cgi is looking through all the
> name/value pairs sent to it and relying on FS/FS/cust_main.pm to handle
> the posting.
>
> How can I add fields to the cust_main object, or otherwise
> expand the fields associated with a customer? Are there any pitfalls
> - like files that are relying on the current structure that would
> also need to be changed - that I should be aware of?
To add fields to the cust_main table:
1) add the fields to the database
2) (possibly) add the fields to fs-setup if you want new databases to have
them.
3) add the fields to FS/FS/cust_main.pm, specifically a data check/untaint
in the _check_ subroutine (and reinstall)
4) run bin/dbdef-create to update the database description files
5) modify the .cgi user interface code
HTH.
In the future, please use a new subject for new messages, rather than
replying to an unrelated question. (Simply hitting "Reply" and changing
the subject is not adequate; this leaves an "In-Reply-To:" header, which
threads your message for those of us fortunate enough to use threaded
mailreaders.)
--
meow
_ivan
More information about the freeside-users
mailing list