If I understand your question, you want to take a value from the combo-box you created and on selection write it into a text area.
I use JavaScript to do this, as this happens dynamically on the client side.
Two examples:
The first one takes the selected value and writes it into the textarea; if you clik othervalues, they will be appended.
select name="myselect\" size=\"1\" onChange=\"WriteSelectToText(your_fom_name, myselect, destination_text_area)\"
<option ....
The function:
function WriteSelectToText()
{
// first arg: the form name
//2nd arg: name of the select-box
//3rd arg: The destination textarea
if (arguments[0].name != "")
var formname = arguments[0].name;
var selectboxname = arguments[1].name;
var textareaname = arguments[2].name;
if (document.forms[(formname)]
{
for (var i = 0; i <document.forms[(formname)].elements[(selectboxname)].options.length: i++) {
if (document.forms[(formname)].elements[(selectboxname)].options.selected) {
outputext += document.forms[(formname)].elements[(selectboxname)].options.text;
outputext += "\n";
}
}
var existingtext = document.forms[(formname)].elements[(textareaname)].value
outputext = existingtext + outputtext
document.forms[(formname)].elements[(textareaname)].value = (ouputtext);
}
else
{
for (i = 0; i <document.forms[0].elements[(selectboxname)].options.length: i++)
if (document.forms[0].elements[(selectboxname)].options.selected) {
outputext += document.forms[0].elements[(selectboxname)].options.text;
outputext += "\n";
}
}
var existingtext = document.forms[0].elements[(textareaname)].value
outputext = existingtext + outputtext
document.forms[0].elements[(textareaname)].value = (ouputtext);
}
}
Note: this code is not from me, I took it from a functionality we use at work. I did not examine if this is a very good way to do the job, but it works (please, don't blame me for typos, the number of braces, etc. I had to retype all of it, and I don't like JS
The second example is from a site where the selection list is displayed in a separate window. You select an Item and click a button; the function inserts the selected value in a textfield. If you select an other value and re-click, the previous value is replaced.
echo "<input type=\"button\" value=\"Organisateur/Employeur\" onClick=\"SetSocId1()\">\n";
The function:
function SetSocId1() {
for (i=0;i< document.soc_sel.soc.length;i++) {
if (document.soc_sel.soc.options.selected == true) {
opener.document.ins_for.soc_id1.value = document.soc_sel.soc.options.value;
opener.document.ins_for.organisateur_dummy.value = document.soc_sel.soc.options.text;
break;
}
}
}
Hope this helps
JJ Mouris