I am using Sitecore 9.0.2 with SXA 1.7.1
I have added the below javascript for client-side validation in SXALayout.cshtml page:
Unfortunately, I am getting XA is not defined
error:
I am using Sitecore 9.0.2 with SXA 1.7.1
I have added the below javascript for client-side validation in SXALayout.cshtml page:
Unfortunately, I am getting XA is not defined
error:
You shouldn't change views which come OOTB unless it is really necessary.
I would recommend creating js file with your custom scripts and adding that file into your theme in SXA. Make sure it's loaded as last one.
Follow this great tutorial on Sitecore Doc site -> https://doc.sitecore.net/sitecore_experience_accelerator/designing/themes/the_sxa_themes
Location of file would be /sitecore/media library/Themes/{theme_name}/scripts/
e.g. /sitecore/media library/Themes/Wireframe/scripts/
if you are using Wireframe theme.