$_GET and form inconsistancies -- suggestion to engineers. - 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: $_GET and form inconsistancies -- suggestion to engineers. (/showthread.php?tid=39078) |
$_GET and form inconsistancies -- suggestion to engineers. - El Forum - 02-28-2011 [eluser]Jaketoolson[/eluser] I'm using $_GET for the majority of my forms and have had no problems with this using CI 2.0. In form_helpers and other places, you only check for $_POST and never for $_GET. I understand this is an obvious observation, but since you've enabled query_string and $_GET support, it would be nice if you could quickly enable this throughout all methods and functions. for example, currently I can't use set_value() in any of my forms : Code: function set_value($field = '', $default = '') Also, the form helper functions are inconsistent. For example, form_dropdown() and form_hidden() functions do not allow me to pass an array of 'extra parameters' yet the other form helper functions do... For now, I'll have to extend all functions where this occurs just thought it would be nice to consider updating. $_GET and form inconsistancies -- suggestion to engineers. - El Forum - 04-26-2011 [eluser]c77m[/eluser] In case it helps anybody else, here is my MY_form_helper.php that adds GET string functionality for set_value and set_select. (Sorry, I'm not using any others in my forms at this point, so I only modified these two.) Not complex, but save you a few mins... Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |