Nesting custom forms in standard pages


#1

Hi

For many years we were advised to avoid nesting custom forms inside a standard page due to caching issues. I believe this isn’t a big deal any more if it’s configured correctly.

So what is the correct way to nest a custom form within a standard page? I couldn’t find any details in the manuals, so would appreciate it if someone could point me in the right direction.

Thanks in advance

Matrix Version: 5.4.2.0


(Bart Banda) #2

Why do you believe this isn’t a big deal anymore?

Caching of form data will always be an issue, both in Matrix cache but more commonly in external proxy cache.

Options for nesting acustom form in soemwhere else include:

  • Ajaxing the form in and making the form submits via ajax as well (see the contact button on the matrix.squiz.net site (the envelope button in the top right))
  • Nesting it in but making sure that the POST actually goes to the URL of the Custom Form. That way the posted form data won’t be cached on return because the custom form itself should have nocache headers on it

#3

I was speaking to another client who literally said that to me and gave me the impression that it was easier to get it working now in V5 than earlier versions.
Thanks for the info!


(Varun Pandey) #4

Hi Brat!

I am creating a Contact Us form using the ESI and container templates. Form is coming perfectly on Homepage but when I make any form’s field required and submit without entering the required fields the submit button redirects to URL like …/_resources/esi/contact-us where form is showing error.

I want to that form should show error on the homepage itself where form is embedded.