submit a contactForm doesn't take the parameters of my form

Hi,
I have made a dhtmlxForm with some dhtmlxCombo that are loaded with the function

myForm.loadStruct("test.xml");

In my test.xml I have 2 comboboxes and a submit button: <item type="button" value="Submit"/>

When I click on the submit button I want a form action “test.php” and I want that the selected combobox value are put as parameter of my action like a simple html form.

I tried with

myForm.attachEvent("onButtonClick",function(name,command){ document.forms[0].submit() });
But it’s not taking my parameters of my form.

can someone help?

Hi

  1. You need to get combo from the form in aftercall

var combo; myForm.loadStruct("test.xml", function(){ combo = myForm.getCombo(comboName) });
2) You need to get combo value

myForm.attachEvent("onButtonClick", function(name){ var value = combo.getSelectedValue() ... });
3) Place this value to your html form

Plus you can use dhtmlxForm and it’s submit functions:
docs.dhtmlx.com/doku.php?id=dhtmlxform:it_save

Thank you very much. It works

You are welcome!