Welcome Guest, Not a member yet? Register   Sign In
Form Validation Class - Get validated values?
#16

[eluser]rlaskey[/eluser]
[quote author="dmorin" date="1236484683"]In your case, it may be better to use the last parameter of the helper functions to set the default value, which will be used since the values don't exist in the POST array.[/quote]

Right. This may be how I set things up in this case in the future. I'm using the page as a create / edit page, which is part of the reason I wanted to go the way that I did. There are a lot of cases to handle, and I found the above to be the most compact way of getting what I wanted.

My main point, however, was about the importance of the $this->form_validation->_field_data array. This is a rather hidden variable, but is a fundamental part of the form_validation class and the built-in CI form helpers. By supplying information into $this->form_validation->_field_data instead of POST, you may be able to get the result that you want. There may not be explicit functions in handling this variable the way you want, though this does not mean that there is necessarily a bug in the form validation class.


Messages In This Thread
Form Validation Class - Get validated values? - by El Forum - 03-05-2009, 07:37 PM
Form Validation Class - Get validated values? - by El Forum - 03-05-2009, 08:49 PM
Form Validation Class - Get validated values? - by El Forum - 03-05-2009, 09:01 PM
Form Validation Class - Get validated values? - by El Forum - 03-05-2009, 09:24 PM
Form Validation Class - Get validated values? - by El Forum - 03-05-2009, 09:30 PM
Form Validation Class - Get validated values? - by El Forum - 03-05-2009, 09:39 PM
Form Validation Class - Get validated values? - by El Forum - 03-05-2009, 09:46 PM
Form Validation Class - Get validated values? - by El Forum - 03-05-2009, 09:56 PM
Form Validation Class - Get validated values? - by El Forum - 03-05-2009, 09:58 PM
Form Validation Class - Get validated values? - by El Forum - 03-05-2009, 10:23 PM
Form Validation Class - Get validated values? - by El Forum - 03-06-2009, 08:02 AM
Form Validation Class - Get validated values? - by El Forum - 03-06-2009, 08:15 AM
Form Validation Class - Get validated values? - by El Forum - 03-06-2009, 11:51 AM
Form Validation Class - Get validated values? - by El Forum - 03-07-2009, 03:42 PM
Form Validation Class - Get validated values? - by El Forum - 03-07-2009, 03:58 PM
Form Validation Class - Get validated values? - by El Forum - 03-08-2009, 11:18 AM
Form Validation Class - Get validated values? - by El Forum - 03-08-2009, 11:26 AM
Form Validation Class - Get validated values? - by El Forum - 03-08-2009, 11:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB