Jump to content

Recommended Posts

Posted

Hello @all,

I have a problem by using the template cache on a template with a form.

On a page I have a contact form, and I have defined cache deactivating variables to prevent loading the page from cache after form submission.

I use query strings after the url: ?submit=success or ?submit=error (depending on the form validation).

If I push the submit button, the page will be reloaded always with the same query string (in my case ?submit=error, because this is my default query string after submission). After the page reload the template cache is disabled, but the form values will not be sent to my email address.

If I fill out the form once more (remember template cache is disabled at the moment) and I push the submit button everything works fine.

So it seems that the template cache prevents values from beeing submitted.

Does anyone have a working strategy to use template cache with forms?

Thanks in advance

Posted

Hi @Juergen

First of all, you have to be sure that your defined setting in cache disable variables is correct. 

To test it try to put * in GET or POST field in settings and try to submit the form. 

 

 

Posted

Thanks @abdus,

I know about this possibility, but I would prevent this. Another solution would be to load the forms via Ajax. For the moment I will leave the template cache disabled.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...