3

We recently upgraded from Sitecore 9.1.0 to 9.1.1 and now our forms fail when there is validation required.

The page reloads with this querystring:

/formbuilder?fxb.FormItemId=b0a35bf4-8b82-466d-8245-95c21d9d5b9f&fxb.HtmlPrefix=fxb.74bab89c-4646-4eee-8280-0dadae3db12f

and in the console, I can see an error

enter image description here

I have checked the sitecore modules/web/experience forms/scripts folder contains the versions of the scripts that the form should be referencing.

enter image description here

I think the issue is related to the page source on the upgraded site missing

enter image description here

Which should be there OOTB. So I'm not sure what the upgrade has done to cause them to not be there?

2

So in hunting around I discovered that Sitecore 9.1.1 \views\shared\sitecore form wrapper.cshtml is missing the render lines. Not sure if that was intentional and they're supposed to work some other way? But putting them back in fixes my form!

enter image description here

Looks to be intentional. Here is an article that talks about a requirement to update in MVC layout.

https://doc.sitecore.com/developers/91/sitecore-experience-management/en/add-a-form-to-a-webpage.html

In Summary - if you're using Sitecore 9+ you're supposed to add those 2 lines to the MVC layout file. If you're using Sitecore 9.1.1 with SXA 1.8.1 those lines are missing from the Sitecore forms wrapper.cshtml (which I believe they should be there - as I didn't need to add them in SXA 1.8).

1

I got an official response from Sitecore Support. In SXA 1.8.1 you should add the Sitecore Forms Rendering to the Metadata partial

enter image description here

Unfortunately for the upgraded site I did not have this as an available rendering. I needed to go and add the Available Meta Rendering - Sitecore Forms to my existing site.

enter image description here

This is available under Renderings\Feature\Experience Accelerator\Forms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.