Welcome Guest, Not a member yet? Register   Sign In
Hype form validation question
#1

[eluser]Marc Arbour[/eluser]
Hi to all.

I need guidance from the community. Maybe it's a language barrier question, maybe I'm just not knowledgeable enough.

I have a complete and running website with CI 2.1 to which I need to add a "help us imprive this page" form.

Is anyone familiar with this type of improvement? Does such a thing exist with CI? If so can you tell me how it is called?

I have tought to add validation code on every controller... But that is a lloonngg job.

I have tried with the help of a function in a helper to no success.

Thanks in advance for any pointer.
#2

[eluser]Iciclefeet[/eluser]
I'm a bit confused as what your asking for. But it kinda sounds like you could use a post_controller hook to add a "help us improve this page" form on every page.
#3

[eluser]Marc Arbour[/eluser]
Hello.

I would like to add a form to every single pages on a running website.

I've just read on post_controller hook. I'm not sure that I understand : I could get some code executed every single time I run a function into a controller?

My case would require post_controller_constructor if I understand correctly to "thank" the visitor for submitting the form and prepare the flash data prior to displaying the webpage.

I'll check on this. Hooks would definately be a first for me.

Thanks

Regards

Marc


#4

[eluser]InsiteFX[/eluser]
MY_Controller
#5

[eluser]meigwilym[/eluser]
Add the form to your template file, have the form POST to a controller/method.

Put the $this->uri->query_string() in a hidden input, and redirect back after the processing.

No worries.

Mei
#6

[eluser]Marc Arbour[/eluser]
Wow!

Read on hooks and on MY_Controller.

Both approaches work just fine for my needs. Thanks to you guys.

I have chosen to go with hook simply because it was suggested first and I had a working test hook before I got suggested the MY_Controller method.

Thank you very much.

Marc.




Theme © iAndrew 2016 - Forum software by © MyBB