Save form events

My code is

How i can catch all senden information and try to validate them and after this save them in DB MySQL and how to insert comboselect if I wanted to edit event? Thx for help.

and try to validate them
onEventSave handler can be used
check samples\02_customization\08_validation.html

Ok thx. Validation is ok but how I can save those comboselect information in DB tabel events and when i wanted them to edit to display them in form edit and viwe them on schedular? I have one more question when I write smth in comoselect which is not in DB how can I save this for exampel Im searching in combo select client and if i dont have him DB i wanted to save him to tabel clients.

All that need to be done through get_value method of your custom form section.
In that code you need to save current values of combo boxes to the event object - all properties of event will be sent to server side, where you can use any custom logic to save their values.

Something like
viewtopic.php?f=6&t=13733&start=0

OK saveing is working but what I need to do to on editing form show combo values? I have one more question about languages. Is there any chance to change language on polish? When Im changeing language in database to ‘utf8_polish_ci’ is not working. Is there some change to change it?

When Im changeing language in database to ‘utf8_polish_ci’ is not working

In the connector code you need to use
$scheduler->set_encoding(“data_encoding_here”);

Not quite sure, but I think that for utf8_polish_ci default utf8 must work correctly, because utf8_polish_ci is the same utf8 just with custom sorting rules ( may be wrong here )

Ok I set encoding on utf-8 but still is problem. May be a page need to be set as ut-8 encoding? Can you help with edditing form?

May be a page need to be set as ut-8 encoding?
Yep, it works more stable when all elements ( db, connector, page ) uses the same encoding.

to do to on editing form show combo values?
Check how set_value implemented in the above mentioned post
set_value takes data from event object and call method of combo , to set it
event object has all properties which is included in generated xml data ( included in list of connector’s data fields )

My set value look like this :[code]set_value:function(node,value,ev){
var inps = node.getElementsByTagName(“INPUT”);
if (!node.combos){
window.dhx_globalImgPath = “images/”;
var comboA = node.comboA = new dhtmlXCombo(“combo_zone_customer”,“dummy”,“450px”);
comboA.enableFilteringMode(true, “comboselect.php?act=cars”, true, false);
comboA.loadXML(“comboselect.php?act=cars”,function(){
comboA.setComboValue(ev.customer_drop||"");
comboA.attachChildCombo(comboB, "comboselect.php?act=models);
// comboA.attachChildCombo(comboC, “comboselect.php?act=clients”);
node.comboA.showSubCombo(node.comboA, true);

                    });
           
                    var comboB = node.comboB = new dhtmlXCombo("combo_zone_address","dummy","450px");
           
                       //comboB.readonly(true);
                       comboB.loadXML("comboselect.php?act=models&uid=<%=uid%>&ter=<%=currterr2%>",function(){
                       comboB.setComboValue(ev.address_drop||"");
                    });
                      /*
                    var comboC = node.comboC = new dhtmlXCombo("combo_zone_contact","dummy","450px");
   
               //comboC.readonly(true);
               comboC.loadXML("comboselect.php?act=clients",function(){
               comboC.setComboValue(ev.contact_drop||"");
            });
               */
            node.combos = true; //added!  // CHANGED
            return;
         }

            node.comboA.setComboValue(ev.customer_drop||""); // CHANGED
            node.comboA.showSubCombo(node.comboA, true);
            node.comboB.setComboValue(ev.address_drop||""); // CHANGED
           // node.comboC.setComboValue(ev.contact_drop||""); // CHANGED
            }[/code]

and comboselect.php

[code]else if($act==‘cars’)
{
$combo = new ComboConnector($res);
$combo->set_encoding(“utf-8”);
$combo->enable_log(“temp.log”);
$combo->dynamic_loading(10);
//$combo->render_table(“marki_samoochodow”,“id”,“nazwa”);
$combo->render_sql(“SELECT * FROM marki_samoochodow”,“id”,“nazwa”);
}
else if($act==‘models’)
{
if( isid($_REQUEST[‘parent’]))
{
$and=“WHERE id_marki=”.$_REQUEST[‘parent’]."";
}
$combo = new ComboConnector($res);
$combo->set_encoding(“utf-8”);
$combo->enable_log(“temp.log”);
$combo->dynamic_loading(100);
//$combo->render_table(“marki_samoochodow”,“id”,“nazwa”);
$combo->render_sql(“SELECT * FROM modele_samochodow “. $and.” ORDER BY nazwa ASC”,“id”,“nazwa”);

} [/code]

I have one more problem it is alert all the time when I load schedular
Here is the link work_sys.byethost22.com/terminarz.php

You have error in connector’s code
Check
work_sys.byethost22.com/04_l … shift=-120".

[code]====================================
Log started, 09/03/2011 10:03:44

SELECT event_id,start_date,end_date,event_name,details,cusid,cusloc FROM events

!!!Uncaught Exception
Code: 0
Message: MySQL operation failed
Unknown column ‘cusid’ in ‘field list’[/code]

Also, the next line in js code is most probably unnecarry
dp.setAutoUpdate(2000);
It requires specially prepared db table to work correctly.

It Is ok now. Thank you. But still when I want edit events it is not display values in comboselect. How to make tooltips with values from comboselect and how to show them in agenda ?

I have one more question about comboselect in “http://www.work_sys.byethost22.com/magazyn.php?act=seek” i have search but how to change search for exampel if I wanted to search for “Filtr oleju MAN u 718/1x” and I write “718” I want to find “Filtr oleju MAN u 718/1x”. I try to edit combo_connector.php in line 68 :

$this->request->set_filter($this->config->text[0]["name"],$_GET["mask"]."%","LIKE"); but it is not working right.

Language problems:
I made convert page to ut-f, in DB is ut-f but if you try search “błotnik” i made “ł” as a “?”
work_sys.byethost22.com/magazyn.php?act=seek
Any solution?