Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Apr 18, 2024 3:07 pm
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: FormHandler question
PostPosted: Tue Jul 08, 2008 10:16 pm 
Offline

Joined: Thu Jan 24, 2008 10:57 pm
Posts: 4
Location: Memphis, TN USA
I've searched about everywhere I can think of and I can't seem to find the answer.

In the FormHandler class under function AddEditElement(), is there a more detailed usage format for field 15 (SQL CUSTOM QUERY)? I would like to figure out how to have a form update a custom table not matching the associated A2B_entity. From what I can gather, this would be done using the SQL CUSTOM QUERY field, but I cannot find a defined format for this query. It does not appear to be standard SQL from what I've seen in other entities that use it.

The only info I see is in {Trunk}/A2Billing_UI/lib/Form/Class.FormHandler.inc.php:801 as follows:
Code:
        // 15. SQL CUSTOM QUERY : customer SQL   or   function to display the edit input

Any input would be much appreciated!

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 09, 2008 4:45 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Hello Percivi,

What form are you trying to customize? It might be better for you to redo the form using conventional means and handle the form processing yourself. I would be really surprise if the FormHandler let you easily do what you are trying to do.

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 09, 2008 7:34 pm 
Offline

Joined: Thu Jan 24, 2008 10:57 pm
Posts: 4
Location: Memphis, TN USA
Thanks for the response.

I am adding an AddEditElement to the FG_var_card.inc file, and that works fine. However, I want this one html field to update a database field for a separate table from 'cc_card'. For example, an AddEditElement that inserts its input value into 'customfield' of the 'cc_custom' table versus inserting it into 'definedfield' of the 'cc_card' table.

This way when someone creates a new customer using the create customer page, they are presented a new option that puts its value in a separate table from 'cc_card'. It would appear that this is already being done in this same form for the CALLERID field, but I cannot figure out the format of the php function parameter.

The code for the CALLERID field is as follows:
Code:
$HD_Form -> AddEditElement (gettext("CALLERID"),
                           "callerid",
                           '$value',
                           "INSERT",
                           "",
                           "",
                           "",
                           "sql",
                           "call_tariff",
                           "label, id",
                           "", "", "%1 : (%2)", "", "", "cc_callerid:cid:cc_callerid:cid, cid, id_cc_card:id_cc_card = %id:id_cc_card:%3 - (%1)::othertablelinked:cli, id_cc_card:%1:id_cc_card='%1':18");
As you can see, it's updating the 'cc_callerid' table instead of the 'cc_card' table. This is exactly what I want to do but for a different table.

Thanks in advance for any help :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group