Welcome Guest, Not a member yet? Register   Sign In
Avoiding form elements caching ???


I know that $this->output->cache(n); caches everything in the page. Is there anything I can do to avoid form elements being cached because they are unique for every users?


I wouldn't cache the form part of the page, since things like validation and form repopulating are difficult with a cached form.

That's what I am asking. How do I avoid it???

Try this:

# I am not sure of the count() value, you will have to check
if( ! isset( $_POST ) && count( $_POST ) < 2 )

Yes but it avoids caching whole page if there is a POST data!

Let me start again: I want to cache everything in a webpage <b>apart from</b> its form elements.

Try a Google search on "Phil Sturgeon partial cache"
edit: spelling

Theme © iAndrew 2016 - Forum software by © MyBB