(Mar 28th, 2010, 4:20 PM)Ben Wrote: Hi Bert,
Yes, that's exactly it: PHP requires you to enter [] characters at the end of the name attribute value in order to let the server know to expect multiple values. e.g.
Code:<select name="myfield[]" multiple size="5"> ... </select>
But within Form Tools, the form name field should just be "myfield" (no square brackets).
This is again an odd PHP-ism.
So you've tried this without any luck?
- Ben
Hi Ben,
Thanks for your always so quick answer. I really like the way you treat messages in general....a compliment!
However...(as you might expect...;-).
First of all I do not use PHP (yet) in the form I mentioned. I do not (yet) make use of the Form Tools API. I only use HTML and rsv.js. Part of the rules (of in total 197 rules!) I apply follows below:
rules.push("required,date1,vul de datum in.");
rules.push("required,mw,hoe heet je?");
rules.push("required,pr_AZ,projectnaam goed invullen.");
rules.push("required,wrks_cat1,kies een werksoort.");
pr_AZ is a select box where users can pick a letter from the alfabet.
This triggers a javascript that via an array produces a list in a field 'pr_naam' : a multiple select box where users can select more values (with Ctrl) starting with the letter (A-Z) from 'pr_AZ'.
Problem is that those values do not appear within form tools.
Now:
1. where exactly do I make sure the field value has [] brackets?
2. in the rule? in the form field name? and how am I sure that within form tools the right field value(s) appear(s)?
3. Could the javascript used to automatically trigger the list in 'pr_naam' be the cause of the problem?
In the body part the code goes:
<select name="pr_AZ" id="pr_AZ" onChange="pr_AZ_OnChange()" class="selectAZ"><option value=""></option><option value="A">A</option><option value="B">B</option><option value="C">C</option><option value="D">D</option><option value="E">E</option><option value="F">F</option><option value="G">G</option><option value="H">H</option><option value="I">I</option><option value="J">J</option><option value="K">K</option><option value="L">L</option><option value="M">M</option><option value="N">N</option><option value="O">O</option><option value="P">P</option><option value="Q">Q</option><option value="R">R</option><option value="S">S</option><option value="T">T</option><option value="U">U</option><option value="V">V</option><option value="W">W</option><option value="X">X</option><option value="Y">Y</option><option value="Z">Z</option></select>
<select id="pr_naam" name="pr_naam" class="selectmultiple"><option value=""></option></select></li>
I hope to have provided you with enough information to go on.
Thanks again in advance!
Bert.
I retried the form submission using brackets and now it produces (,,) as values....