[Solved] Form Validation Callback With Array "selected[]" |
I have a post array called selected on my form name="selected[]"; The set message does not work.
I am still unsure on how to use callbacks with array. I trying to understand it. My callback message works fine with single post but not array[] How can I make call back pick up name="selected[]"; and display message. PHP Code: public function delete() {
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
(04-05-2015, 07:29 AM)riwakawd Wrote: I have a post array called selected on my form name="selected[]"; The set message does not work. I have solved my issue found out why for some reason when I submitted my form if I had error via callback the redirect was clearing it, so therefor no errors were showing up I had to call the main function with the view in it i.e $this->index(); PHP Code: <?php
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
That's standard web behavior. POST and other globals get wiped out on the next page request, which a redirect does. You can also put the validation errors in session flashdata, or a cookie, or something else before redirecting and checking for it in your view, or do what you did to solve it.
|
Welcome Guest, Not a member yet? Register Sign In |