[Problem] Form helper in Codeigniter v3.0rc - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: [Problem] Form helper in Codeigniter v3.0rc (/showthread.php?tid=936) |
[Problem] Form helper in Codeigniter v3.0rc - piece601 - 01-30-2015 Hi have anyone use Form Helper in Codeigniter v3.0rc. I have a problem about it. When My Controller receive $_POST data, PHP Code: $this->form_validation->run() What's happen? I set rules correctly. And PHP Code: echo validation_errors(); Who can help me. RE: [Problem] Form helper in Codeigniter v3.0rc - SquallX - 01-30-2015 Yes, I have the same problem after a lot of tests. If all the input fields are empty : It's okay, all the errors are found And if I fill all fields : The message error is that it nof found the error message, but this message exists in english and in french language. I've also an error with the csrf security, when i activate it in the config file. it's impossible to submit a form :/ RE: [Problem] Form helper in Codeigniter v3.0rc - Narf - 01-30-2015 Did you have 'xss_clean' included in your validation rules? Read the upgrade instructions. RE: [Problem] Form helper in Codeigniter v3.0rc - SquallX - 01-30-2015 Yes, I've tried to deactivate it and it was the same result :/ In fact we need to deactivate global_xss_filtering in the config file and load the security helper to applicate it in the form validation rules ? I've tried it and apparently it works. But, when I use the csrf protection (in config file) I have this error when I try to submit a form : The action you have requested is not allowed. PS : Sorry for my bad english :/ RE: [Problem] Form helper in Codeigniter v3.0rc - Narf - 01-30-2015 (01-30-2015, 08:45 AM)SquallX Wrote: Yes, I've tried to deactivate it and it was the same result :/ If I were you, I'd remove the 'xss_rule', not try to make it work again. It is very much intentional that it's no longer a form validation rule by default. (01-30-2015, 08:45 AM)SquallX Wrote: But, when I use the csrf protection (in config file) I have this error when I try to submit a form : Please read the manual about CSRF protection: http://www.codeigniter.com/userguide3/libraries/security.html#cross-site-request-forgery-csrf RE: [Problem] Form helper in Codeigniter v3.0rc - SquallX - 01-30-2015 Thanks but I've already read the documentation about the csrf protection. My code is like that (I use Twig template) : PHP Code: $this->data = array_merge($this->data, [ And my users_panel.twig contains between form tags : Code: <div class=" col-sm-offset-2 col-sm-10"> So I don't understant why the access is already refused :/ |