CodeIgniter Forums
Help with charset in form helper - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Help with charset in form helper (/showthread.php?tid=48719)



Help with charset in form helper - El Forum - 01-26-2012

[eluser]@robertotra[/eluser]
Hello,
i have a problem with the accept-charset attribute in form_open function from the form helper. As User guide specifies:

Quote:form_open()

Creates an opening form tag with a base URL built from your config preferences. It will optionally let you add form attributes and hidden input fields, and will always add the attribute accept-charset based on the charset value in your config file.

What about if I need only some form fields within some forms to manage Latin1 characters? As example, it is certainly better that login forms are limited to utf-8 chars but textarea for non-english speakers need to accept at least Latin1 (that can then limited to utf-8 characters by use of htmlentities).

Is it not possible to change dynamically this attribute only for some forms according to the local needs or I am obliged to change the charset for the whole application, adding extra validation for all forms or extra workload for the whole application with a larger charset?

Thanks and best regards
Roberto