Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

EPiServer Form posts as page refresh instead of AJAX

$
0
0

I have an EPiServer form loaded on a page and my goal is to get the form to submit via an AJAX call instead of a full page post.

After searching around, I've noticed that there are a few boxes to check to make sure everything is setup to work properly.

  • Check Forms.config to make sure that "workInNonJSMode" is set to false
  • Make sure you have the required client resources in the layout @Hmtl.RequiredClientResources("Header"); and @Hmtl.RequiredClientResources("Footer");

I've confirmed the first item is correct and moved on to the second item. When trying to add this line in the layout file, I get the following error:

"HtmlHelper does not contain a definition for RequiredClientResources..."

It looks like maybe I'm missing another setup item for this particular piece. Could someone help point me in the correct direction?

Also, if it helps, the form is working properly with the full page post. The only error I'm seeing in the console is:

"Uncaught TypeError: Cannot read property 'Forms' of undefined"

Thanks!


Viewing all articles
Browse latest Browse all 8020

Trending Articles