combo and calendar in form attached to a windows


I created a form attached to a windows in order to insert data in my base but combo and calandar fields aren’t displayed in the windows. The window is displayed with an event when you click on button.

in the header of my html document, there are the following libraries :

I followed the samples with just adding a windows layer : … combo.html … endar.html

here the function I use to display the form using a combo :

function ajouterFournisseur() {
var dhxWinFournisseur = new dhtmlXWindows();
var window_ajouter_fournisseur = dhxWinFournisseur.createWindow(‘windows_ajouter_fournisseur’, 300, 200, 400, 330);
var str = [
{ type:“settings” , labelWidth:210, inputWidth:450, position:“absolute” },
{ type:“input” , name:“form_personne_physique”, label:“Personne Physique”, inputWidth:240, required:true, labelLeft:5, labelTop:30, inputLeft:0210, inputTop:30 },
{ type:“input” , name:“form_code”, label:“Code”, inputWidth:240, required:true, labelLeft:5, labelTop:5, inputLeft:0210, inputTop:5 },
{ type:“input” , name:“form_raison_sociale”, label:“Raison Sociale”, inputWidth:240, required:true, labelLeft:5, labelTop:55, inputLeft:0210, inputTop:55 },
{ type:“input” , name:“form_adresse”, label:“Adresse”, inputWidth:240, required:true, labelLeft:5, labelTop:80, inputLeft:0210, inputTop:80 },
{ type:“input” , name:“form_adresse_bis”, label:“Adresse bis”, inputWidth:240, labelLeft:5, labelTop:105, inputLeft:0210, inputTop:105 },
{ type:“input” , name:“form_code_postal”, label:“Code Postal”, inputWidth:240, required:true, labelLeft:5, labelTop:130, inputLeft:0210, inputTop:130 },
{ type:“input” , name:“form_ville”, label:“Ville”, inputWidth:240, required:true, labelLeft:5, labelTop:155, inputLeft:0210, inputTop:155 },
{ type:“input” , name:“form_siret”, label:“Siret”, inputWidth:240, required:true, labelLeft:5, labelTop:180, inputLeft:0210, inputTop:180 },
{ type:“combo” , name:“form_cluster”, label:“Cluster”, labelAlign:“left”, inputWidth:240, required:true, labelLeft:5, labelTop:205, inputLeft:0210, inputTop:205, connector:"./php/cluster.php" },
{ type:“button” , name:“valider”, label:“Valider”, value:“Valider”, width:“100”, inputWidth:100, inputLeft:140, inputTop:250 }

var dhxForm = window_ajouter_fournisseur.attachForm(str);

window_ajouter_fournisseur.setText("Ajouter un fournisseur");


here the function I use to display the form using a calendar:

function ajouterHonoraire() {
var dhxHonoraire = new dhtmlXWindows();
var window_ajouter_honoraire = dhxHonoraire.createWindow(‘windows_ajouter_honoraire’, 300, 200, 340, 175);
var str = [
{ type:“settings” , labelWidth:210, inputWidth:450, position:“absolute” },
{ type:“input” , name:“form_montant”, label:“Montant”, inputWidth:240, required:true, labelLeft:5, labelTop:30, inputLeft:0110, inputTop:30 },
{ type:“calendar” , name:“form_date”, label:“Date”, inputWidth:240, required:true, labelLeft:5, labelTop:5, inputLeft:0110, inputTop:5, dateFormat: “%d-%m-%Y”, serverDateFormat: “%Y-%m-%d”, calendarPosition: “right” },
{ type:“select” , name:“form_code_prestation”, label:“Type”, labelAlign:“left”, inputWidth:240, required:true, labelLeft:5, labelTop:55, inputLeft:0110, inputTop:55, connector:"./php/prestation.php" },
{ type:“button” , name:“valider”, label:“Valider”, value:“Valider”, width:“100”, inputWidth:100, inputLeft:110, inputTop:95 }

var dhxForm = window_ajouter_honoraire.attachForm(str);

window_ajouter_honoraire.setText("Ajouter une prestation");


by the way, if i replace “combo” by “select”, it works great. I decided not to use a select item because I created a similar function to load a form. Then when loading data with a connector, the select field doesn’t return the the correct value. I think it’s because I used a connector to define the select values.

Thanks for your advices.


please provide completed demo or dircet link?


here the complete demo :

forms are displayed when you click on “new” and “modify” buttons for each grid.


thanks for link

should be after

Thx it works.
So order matters…good to know !