I had to use window.postMessage to communicate between the site and the iframe (Qualtrics component) to pass the local storage variable.https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
Thanks for the help! In my original post I mentioned that this is a Website/App Insights Feedback button intercept. This component is inherently only used in other sites.
Thanks Ahmed, but I already know they are not the same and I have already tried the technique that you are suggesting. Local Storage is returned as null from any component within the Qualtrics. I am thinking this is probably a scope problem on account of the iframe.
I was able to figure it out. The code to artificially click the Submission button needs to be in an asynchronous callback so that it happens after advancing from the current question. Here is the code that worked. This was placed on the last question:Qualtrics.SurveyEngine.addOnPageSubmit(function(){ // Skip the Submission page by forcing click of the next button setTimeout(()=>{ this.clickNextButton(); }, 1); });
Follow-up to my last post.I was able to get LWCs working but only for certain Creatives. I also discovered that certain Creatives will not work properly in Aura Components either. For example Embedded Feedback does not work properly in an Aura Component, but it did work in a standard HTML Editor component in Experience Builder.There may also be certain elements hidden in the Shadow DOM that are blocking Qualtrics functionality from working properly in LWCs. You may be able experiment with the Light DOM feature and have better success.https://developer.salesforce.com/docs/platform/lwc/guide/create-dom.html
I receive this this error when I try to skip the submission page at the end of a survey via JavaScript.
@migalexdiaz and @etc11b you’ll need to separate out the code, as the snippet is a combination of a script tag and a div tag with a specific id. You will need to put them in two different places due to the security restrictions of how Salesforce components work. You will need to put the script part in a Static Resource, and load it from an Aura component. The Aura component should also contain the div with the id.https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_libs_platform.htm Don’t forget to add the necessary CSP directives to the Trusted URLs in Setup, as well as the CSP policies in the Experience Builder:https://www.qualtrics.com/support/website-app-feedback/getting-started-with-website-app-feedback/website-app-feedback-technical-documentation/?utm_medium=product&utm_source=web-app-feedback#FAQ5 Alternatively, you can put the script part in the Head markup of each page (under the Advanced tab in the Experience Builder settings) instead of loading i
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.