Hi all, I have the below form (leaving out non-essential code)
form = FORM( DIV( UL( SPAN(LABEL('Name:')), SPAN(INPUT(_type="text", _name="name", requires=IS_NOT_EMPTY()))), DIV( LABEL("Items:"), UL( SPAN(INPUT(_type="text", _name="items[]")), SPAN(INPUT(_type="text", _name="items[]")), SPAN(INPUT(_type="text", _name="items[]")) )) DIV( INPUT(_type="submit", _value="Create My List"), _class="submitbtn button") )) if form.accepts(request.vars, session): <rest of code> If this form is submitted with values the form values are written into the databases. No problem. However, if it is submitted with an empty first field (name), the the fields _name="items[]" are filled with values ['', ''] when errors are flashed on the screen. I am not able to find why it happens and also how to fix it. (there is a reason why I use the _name="items[]" - user should be able to add as many items as possible at the client side). Any clues and solution is appreciated. Thank you. Joseph