Hello,
Before I decided to use FCKeditor I submitted my form using a javascript to create a "character-separated list". This enabled me to use lots of textareas with the same name on my page.
Now that I use fckeditor, my script does not work anymore. Below the script I used to convert all kind of input-fields (textarea, input) to a characted-separated list:
function cycle()
{
var tekst = '';
var users = '';
var onderwerpen = '';
var contacts = '';
// Alle elementen in de form nalopen en opslaan in array
for (var i = 0; i<document.bsForm.elements.length; i++)
{
if ((document.bsForm.elements[i].name.indexOf('bsTekst') > -1))
{
tekst += document.bsForm.elements[i].value + '~';
}
if ((document.bsForm.elements[i].name.indexOf('bsUser') > -1))
{
users += document.bsForm.elements[i].value + ',';
}
if ((document.bsForm.elements[i].name.indexOf('bsOnderwerp') > -1))
{
onderwerpen += document.bsForm.elements[i].value + '~';
}
if ((document.bsForm.elements[i].name.indexOf('bsContact') > -1))
{
contacts += document.bsForm.elements[i].value + ',';
}
}
document.bsForm.bsTeksten.value = tekst;
document.bsForm.bsUsers.value = users;
document.bsForm.bsOnderwerpen.value = onderwerpen;
document.bsForm.bsContacts.value = contacts;
}
is there an (easy to implement) option which enables me to submit more than 1 textarea and convert it into a comma-separated list?
Before I decided to use FCKeditor I submitted my form using a javascript to create a "character-separated list". This enabled me to use lots of textareas with the same name on my page.
Now that I use fckeditor, my script does not work anymore. Below the script I used to convert all kind of input-fields (textarea, input) to a characted-separated list:
function cycle()
{
var tekst = '';
var users = '';
var onderwerpen = '';
var contacts = '';
// Alle elementen in de form nalopen en opslaan in array
for (var i = 0; i<document.bsForm.elements.length; i++)
{
if ((document.bsForm.elements[i].name.indexOf('bsTekst') > -1))
{
tekst += document.bsForm.elements[i].value + '~';
}
if ((document.bsForm.elements[i].name.indexOf('bsUser') > -1))
{
users += document.bsForm.elements[i].value + ',';
}
if ((document.bsForm.elements[i].name.indexOf('bsOnderwerp') > -1))
{
onderwerpen += document.bsForm.elements[i].value + '~';
}
if ((document.bsForm.elements[i].name.indexOf('bsContact') > -1))
{
contacts += document.bsForm.elements[i].value + ',';
}
}
document.bsForm.bsTeksten.value = tekst;
document.bsForm.bsUsers.value = users;
document.bsForm.bsOnderwerpen.value = onderwerpen;
document.bsForm.bsContacts.value = contacts;
}
is there an (easy to implement) option which enables me to submit more than 1 textarea and convert it into a comma-separated list?