Welcome Guest, Not a member yet? Register   Sign In
Validation fails to fill form elements or error message.
#11

[eluser]Colin Williams[/eluser]
[quote author="valarkin" date="1217727988"]I found the issue. I was calling $this->load->library('validation'); in the constructor. You need to have it in the method that you will be calling $this->load->view() from!

Ah well, live and learn![/quote]

Is that so? That's odd, because the constructor HAS to have loaded for the method to load. My hunch is that your form page is being cached, so it's being served up value-less. And that's a very baseless hunch... I have no clue.
#12

[eluser]valarkin[/eluser]
Hey Colin,

I thought that as well, but so far, the only way I could get it to work was to load the library in the function that was doing the validation. I will check into this when I have more time. I don't like not knowing what caused the problem to begin with.
#13

[eluser]Colin Williams[/eluser]
I just moved one of my Controller method calls to $this->load->library('validation') up to the constructor and had no problem with it. Very odd what you're experiencing.
#14

[eluser]Yash[/eluser]
[quote author="Colin Williams" date="1217745619"]I just moved one of my Controller method calls to $this->load->library('validation') up to the constructor and had no problem with it. Very odd what you're experiencing.[/quote]
I know this factor but I don't want to tell him right now.I feel he just started using this CI.anyways you make him confused and clear . ;-P




Theme © iAndrew 2016 - Forum software by © MyBB