Welcome Guest, Not a member yet? Register   Sign In
Form problem
#1

[eluser]dimis[/eluser]
I have a form and some inputs for languages.
For each language I have name[en],name[gr] etc.
These names as dynamically created from a database.
When I submit this form there is the message Disallowed Key Characters even I do not assign the post elements.
How can I resolve it or how I can pass these elements that i can not create them statically?
#2

[eluser]xwero[/eluser]
I think you better keep the name of the inputs in English. Normally users will only see the name of an input if they look at the source of the html page.

If users are allowed to create forms then it's another situation. Then i would recommend to filter out the character that aren't in the basic ascii character map.

Having one name also makes it easier to validate and store data from the inputs.
#3

[eluser]dimis[/eluser]
I have these inputs
<input type=text name='name[gr]'>
<input type=text name='name[en]'>
<input type=text name='name[it]'>

My code read the database and write the elements, CI must read the [] elements when i delete these elements all is ok.I thing I have to use another idea.
#4

[eluser]xwero[/eluser]
The POST key for those inputs is name. CI has not trouble to store it in a database but you can have problems with the validation and input library.

The validation library can't handle arrays yet, the new version in SVN can.

The input->post method will see the adding of the parameter 'name[gr]' as the name of the key so it will not recognise it's a part of an array.

What you could do is to suffix the name with the language abbreviation. So you get name_gr, name_en, name_it but that is a bit less convenient to process.




Theme © iAndrew 2016 - Forum software by © MyBB